summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-12-12 11:40:55 -0700
committerGitHub <noreply@github.com>2017-12-12 11:40:55 -0700
commit22d917776b80dc7cef683fc17f4ea15b1ce98fcc (patch)
treee0c54af1bcec936d9a3cc12f5b0012d7f5a1ff0f /numpy/lib/tests/test_index_tricks.py
parent0300a3d32ad70f7ce23054360852d872bacca46f (diff)
parente7d571396e92b670a0e8de6e50366ba1dbee3c6e (diff)
downloadnumpy-22d917776b80dc7cef683fc17f4ea15b1ce98fcc.tar.gz
Merge pull request #10207 from eric-wieser/np.r_-scalars
ENH: Allow np.r_ to accept 0d arrays
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):