From d4bc1b6795912391473a56f6e757e39bd7b63676 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Mon, 11 Dec 2017 22:28:35 -0800 Subject: ENH: Allow np.r_ to accept 0d arrays Fixes gh-9233 --- numpy/lib/tests/test_index_tricks.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'numpy/lib/tests/test_index_tricks.py') 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): -- cgit v1.2.1