diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2016-05-15 10:55:15 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@gmail.com> | 2016-05-16 09:32:50 +0200 |
commit | 294a7b894230845ea325b7dd5d45a1aff93121c8 (patch) | |
tree | 1617f727a3179dbe2f46bf65ec61638dbd27d4b9 /numpy/lib | |
parent | 4f0f3528fd3aa90d99abb658eb5d35896ba8c449 (diff) | |
download | numpy-294a7b894230845ea325b7dd5d45a1aff93121c8.tar.gz |
TST: fix test error due to use of deprecated np.testing.rand utility.
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/tests/test_twodim_base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py index b65a8df97..b8e7301d7 100644 --- a/numpy/lib/tests/test_twodim_base.py +++ b/numpy/lib/tests/test_twodim_base.py @@ -5,7 +5,7 @@ from __future__ import division, absolute_import, print_function from numpy.testing import ( TestCase, run_module_suite, assert_equal, assert_array_equal, - assert_array_max_ulp, assert_array_almost_equal, assert_raises, rand, + assert_array_max_ulp, assert_array_almost_equal, assert_raises ) from numpy import ( @@ -254,7 +254,7 @@ class TestHistogram2d(TestCase): assert_array_almost_equal(H, answer, 3) def test_all_outliers(self): - r = rand(100) + 1. + 1e6 # histogramdd rounds by decimal=6 + r = np.random.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) @@ -267,10 +267,10 @@ class TestHistogram2d(TestCase): def test_binparameter_combination(self): x = array( - [0, 0.09207008, 0.64575234, 0.12875982, 0.47390599, + [0, 0.09207008, 0.64575234, 0.12875982, 0.47390599, 0.59944483, 1]) y = array( - [0, 0.14344267, 0.48988575, 0.30558665, 0.44700682, + [0, 0.14344267, 0.48988575, 0.30558665, 0.44700682, 0.15886423, 1]) edges = (0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1) H, xe, ye = histogram2d(x, y, (edges, 4)) |