summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-05-30 20:41:37 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-05-30 20:41:37 +0200
commit40bebbaca156c6eb18ded4d02782bf7e177376f4 (patch)
treed6feb303c9c3a81fc2840009e5ecc11c60618954
parenta3fda96c7f25699584ac2cfa3617372db808e67f (diff)
downloadnumpy-40bebbaca156c6eb18ded4d02782bf7e177376f4.tar.gz
TST: fix random failing histogram test
histogramdd rounds by decimal=6 so the random numbers may not be outliers if they are below 1. + 1e6
-rw-r--r--numpy/lib/tests/test_twodim_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py
index 9e81cfe4b..f5b8fab4a 100644
--- a/numpy/lib/tests/test_twodim_base.py
+++ b/numpy/lib/tests/test_twodim_base.py
@@ -254,7 +254,7 @@ class TestHistogram2d(TestCase):
assert_array_almost_equal(H, answer, 3)
def test_all_outliers(self):
- r = rand(100)+1.
+ r = rand(100) + 1. + 1e6 # histogramdd rounds by decimal=6
H, xed, yed = histogram2d(r, r, (4, 5), range=([0, 1], [0, 1]))
assert_array_equal(H, 0)