summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorTravis E. Oliphant <teoliphant@gmail.com>2013-01-21 20:50:15 -0600
committerTravis E. Oliphant <teoliphant@gmail.com>2013-01-21 20:50:15 -0600
commit4c489f6d6edccc4d7fe2310b0e0902e980b5f52b (patch)
treea14dc3f396269bbff46e66657d176e3d76398699 /numpy/lib/tests/test_index_tricks.py
parentce5506f73bbb0233e825efef4f94dd39de05be07 (diff)
downloadnumpy-4c489f6d6edccc4d7fe2310b0e0902e980b5f52b.tar.gz
TST: Add a test for ndindex call.
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, [()])