summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_twodim_base.py
diff options
context:
space:
mode:
authorDavid Huard <david.huard@gmail.com>2011-07-20 14:36:35 -0400
committerRalf Gommers <ralf.gommers@googlemail.com>2011-07-24 18:46:50 +0200
commit1b62bdfb04e56f75fc61dbbd1f2600a72951b19d (patch)
treeb4666b9807cc29ccfe97178ba36c2f6ca04663ce /numpy/lib/tests/test_twodim_base.py
parente2af7b755746a7269df247418ee383f1eb39c0bc (diff)
downloadnumpy-1b62bdfb04e56f75fc61dbbd1f2600a72951b19d.tar.gz
BUG: fixed histogramdd bug with empty inputs. Closes #1899.
Diffstat (limited to 'numpy/lib/tests/test_twodim_base.py')
-rw-r--r--numpy/lib/tests/test_twodim_base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py
index a7c0e85c8..37165f672 100644
--- a/numpy/lib/tests/test_twodim_base.py
+++ b/numpy/lib/tests/test_twodim_base.py
@@ -224,7 +224,10 @@ class TestHistogram2d(TestCase):
def test_empty(self):
a, edge1, edge2 = histogram2d([],[], bins=([0,1],[0,1]))
- assert_array_max_ulp(a, array([ 0., 0.]))
+ assert_array_max_ulp(a, array([[ 0.]]))
+
+ a, edge1, edge2 = histogram2d([], [], bins=4)
+ assert_array_max_ulp(a, np.zeros((4, 4)))
class TestTri(TestCase):