diff options
author | David Cournapeau <cournape@gmail.com> | 2010-02-02 04:54:53 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2010-02-02 04:54:53 +0000 |
commit | 1473800aeb30256517a11556fa1ad86c9127d641 (patch) | |
tree | c43be7784cb14fcb34b0baf1ba65fc8a4360b85e /numpy/lib/tests/test_regression.py | |
parent | 60e53321fbb0a5e3ae630100eff32aec939a4434 (diff) | |
download | numpy-1473800aeb30256517a11556fa1ad86c9127d641.tar.gz |
BUG: fix #1387. Raise ValueError for empty input to bincount.
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r-- | numpy/lib/tests/test_regression.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index 9821ba97e..16add3295 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -176,6 +176,9 @@ class TestRegression(TestCase): sys.stdout = sys.__stdout__ raise AssertionError("ticket #1243") + def test_bincount_empty(self): + """Ticket #1387: empty array as input for bincount.""" + assert_raises(ValueError, lambda : np.bincount(np.array([], dtype=np.intp))) if __name__ == "__main__": run_module_suite() |