Skip to content

Commit

Permalink
TST: fix test error due to use of deprecated np.testing.rand utility.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommers committed May 16, 2016
1 parent 4f0f352 commit 294a7b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions numpy/lib/tests/test_twodim_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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 (
Expand Down Expand Up @@ -254,7 +254,7 @@ def test_norm(self):
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)

Expand All @@ -267,10 +267,10 @@ def test_empty(self):

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))
Expand Down

0 comments on commit 294a7b8

Please sign in to comment.