8000 Add test for optional size argument for ndindex · seberg/numpy@ffb8c41 · GitHub
[go: up one dir, main page]

Sk 8000 ip to content

Commit ffb8c41

Browse files
committed
Add test for optional size argument for ndindex
1 parent fda92e2 commit ffb8c41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpy/lib/tests/test_index_tricks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ def test_ndindex():
242242
expected = [ix for ix, e in np.ndenumerate(np.zeros((1, 2, 3)))]
243243
assert_array_equal(x, expected)
244244

245+
# Make sure size argument is optional
246+
x = list(np.ndindex())
247+
assert_equal(x, [(0,)])
248+
245249

246250
if __name__ == "__main__":
247251
run_module_suite()

0 commit comments

Comments
 (0)
0