diff options
author | Travis E. Oliphant <teoliphant@gmail.com> | 2013-01-23 20:21:18 -0800 |
---|---|---|
committer | Travis E. Oliphant <teoliphant@gmail.com> | 2013-01-23 20:21:18 -0800 |
commit | 2b4c9a66c8485973291076a6a1d3a3e9a3ffa5cc (patch) | |
tree | a08b963d504e754a035d9a7b249c2f8485d0565e /numpy/lib/tests/test_index_tricks.py | |
parent | dce10183bc8f3d243bd5fc70140f5ad71179d05c (diff) | |
parent | 4c489f6d6edccc4d7fe2310b0e0902e980b5f52b (diff) | |
download | numpy-2b4c9a66c8485973291076a6a1d3a3e9a3ffa5cc.tar.gz |
Merge pull request #2940 from ContinuumIO/ndindex_fix_more
BUG: Fix logic in ndindex to match __init__ method. Fixes bug in ndindex((3,))
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
-rw-r--r-- | numpy/lib/tests/test_index_tricks.py | 4 |
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, [()]) |