From e35c61cddb51dda2751e2579708b902061a5b2a2 Mon Sep 17 00:00:00 2001 From: Ines Wichert Date: Thu, 25 Feb 2016 09:02:00 -0500 Subject: TST: test for #6469 --- numpy/lib/tests/test_function_base.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'numpy/lib/tests/test_function_base.py') diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 235b7f2fe..3d61041a3 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -1279,6 +1279,12 @@ class TestHistogram(TestCase): a, b = histogram([], bins=([0, 1])) assert_array_equal(a, np.array([0])) assert_array_equal(b, np.array([0, 1])) + + def test_error_binnum_type (self): + # Tests if right Error is raised if bins argument is float + vals = np.linspace(0.0, 1.0, num=100) + histogram(vals, 5) + assert_raises(TypeError, histogram, vals, 2.4) def test_finite_range(self): # Normal ranges should be fine -- cgit v1.2.1