summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-12-11 22:28:35 -0800
committerEric Wieser <wieser.eric@gmail.com>2017-12-11 22:28:35 -0800
commitd4bc1b6795912391473a56f6e757e39bd7b63676 (patch)
tree00c9a6cac7fe9c39886fc6a1a6b120dde45e8033 /numpy/lib/tests/test_index_tricks.py
parent8032cf4762008155fca610fb61092e6c9ecae98b (diff)
downloadnumpy-d4bc1b6795912391473a56f6e757e39bd7b63676.tar.gz
ENH: Allow np.r_ to accept 0d arrays
Fixes gh-9233
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 1d5efef86..b5e06dad0 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -216,6 +216,11 @@ class TestConcatenator(object):
assert_equal(actual, expected)
assert_equal(type(actual), type(expected))
+ def test_0d(self):
+ assert_equal(r_[0, np.array(1), 2], [0, 1, 2])
+ assert_equal(r_[[0, 1, 2], np.array(3)], [0, 1, 2, 3])
+ assert_equal(r_[np.array(0), [1, 2, 3]], [0, 1, 2, 3])
+
class TestNdenumerate(object):
def test_basic(self):