summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-03-22 22:56:21 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-05-05 21:45:48 +0100
commitb2006cb2a7fe508bca8aa7039352731634869334 (patch)
tree625dbf0e21ace0f739089b48b5cddc6b1b8d1b87 /numpy/lib/tests/test_index_tricks.py
parentd6069fb19107300e59ba57093cb87e44fa39599f (diff)
downloadnumpy-b2006cb2a7fe508bca8aa7039352731634869334.tar.gz
BUG: np.r_['r',...] crashes on scalars
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
-rw-r--r--numpy/lib/tests/test_index_tricks.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index 708c3c964..5b791026b 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -189,6 +189,11 @@ class TestConcatenator(TestCase):
assert_raises(ValueError, lambda: np.r_['rc', a, b])
+ def test_matrix_scalar(self):
+ r = np.r_['r', [1, 2], 3]
+ assert_equal(type(r), np.matrix)
+ assert_equal(np.array(r), [[1,2,3]])
+
def test_matrix_builder(self):
a = np.array([1])
b = np.array([2])