diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-03-22 22:56:21 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-05-05 21:45:48 +0100 |
commit | b2006cb2a7fe508bca8aa7039352731634869334 (patch) | |
tree | 625dbf0e21ace0f739089b48b5cddc6b1b8d1b87 /numpy/lib/tests/test_index_tricks.py | |
parent | d6069fb19107300e59ba57093cb87e44fa39599f (diff) | |
download | numpy-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.py | 5 |
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]) |