diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-03-17 18:36:18 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-03-17 18:36:18 -0600 |
commit | 89ae05693b9bdfda78a6138e606be7b5531b1ab9 (patch) | |
tree | 6323f55b7cc057c124e699c0377a3b974f2fb76e /numpy/lib/tests/test_function_base.py | |
parent | 4d0875aa31355066c7acf2b8de1bbb366fc46d18 (diff) | |
parent | e35c61cddb51dda2751e2579708b902061a5b2a2 (diff) | |
download | numpy-89ae05693b9bdfda78a6138e606be7b5531b1ab9.tar.gz |
Merge pull request #7341 from inesw/bug-fix-6469
TST: Add test for #6469
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 63ebb6d0c..d5b725875 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -1390,6 +1390,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 |