summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_regression.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2009-06-19 13:01:20 +0000
committerPauli Virtanen <pav@iki.fi>2009-06-19 13:01:20 +0000
commit6cfb1c6c4ef9b5d44ada70d94f1573c8f964c3ac (patch)
tree7f6b41f4fa86a8809144b2c64f3c7a68f705950b /numpy/lib/tests/test_regression.py
parentee57730721f7b101cb9477be50a3d1bb255ebf06 (diff)
downloadnumpy-6cfb1c6c4ef9b5d44ada70d94f1573c8f964c3ac.tar.gz
Fixed #1140: avoid div-by-zero in iter_coords_get for size=0 arrays
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r--numpy/lib/tests/test_regression.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py
index b8c487962..5abf9aefe 100644
--- a/numpy/lib/tests/test_regression.py
+++ b/numpy/lib/tests/test_regression.py
@@ -48,6 +48,10 @@ class TestRegression(object):
"""Ticket 928."""
assert_raises(ValueError, np.histogramdd, np.ones((1,10)), bins=2**10)
+ def test_ndenumerate_crash(self):
+ """Ticket 1140"""
+ # Shouldn't crash:
+ list(np.ndenumerate(np.array([[]])))
if __name__ == "__main__":
run_module_suite()