8000 FIX: make the test_pareto() robust · certik/numpy@74093c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 74093c8

Browse files
committed
FIX: make the test_pareto() robust
Fixes numpy#424 The problem was that in 32bit Ubuntu 12.04, one gets the following: > /home/njs/numpy/.tox/py27/local/lib/python2.7/site-packages/numpy/random/tests/test_random.py(363)test_pareto() -> np.testing.assert_array_almost_equal(actual, desired, decimal=15) (Pdb) actual[1, 0] 52828779.702948704 (Pdb) desired[1, 0] 52828779.702948518 and the test was comparing the numbers to 1e-14, which obviously failed. Now we compare them to 1e-6, which works.
1 parent a72ce7e commit 74093c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/random/tests/test_random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_pareto(self):
360360
desired = np.array([[ 2.46852460439034849e+03, 1.41286880810518346e+03],
361361
[ 5.28287797029485181e+07, 6.57720981047328785e+07],
362362
[ 1.40840323350391515e+02, 1.98390255135251704e+05]])
363-
np.testing.assert_array_almost_equal(actual, desired, decimal=15)
363+
np.testing.assert_array_almost_equal(actual, desired, decimal=6)
364364

365365
def test_poisson(self):
366366
np.random.seed(self.seed)

0 commit comments

Comments
 (0)
0