summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
-rw-r--r--numpy/lib/tests/test_index_tricks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index 43160ffb7..a6e65ef56 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -245,6 +245,10 @@ def test_ndindex():
x = list(np.ndindex((1, 2, 3)))
assert_array_equal(x, expected)
+ # Test use of scalars and tuples
+ x = list(np.ndindex((3,)))
+ assert_array_equal(x, list(np.ndindex(3)))
+
# Make sure size argument is optional
x = list(np.ndindex())
assert_equal(x, [()])