diff options
author | Nathaniel J. Smith <njs@pobox.com> | 2012-07-12 13:20:20 +0100 |
---|---|---|
committer | Nathaniel J. Smith <njs@pobox.com> | 2012-07-17 16:51:31 +0100 |
commit | b26c675e2a91e1042f8f8d634763942c87fbbb6e (patch) | |
tree | 7dbe064c0ba2364367948c34506ebfad36ac310c /numpy/testing | |
parent | 64c3a8f464e1b187aef833dda5ad0ce7dba44ef4 (diff) | |
download | numpy-b26c675e2a91e1042f8f8d634763942c87fbbb6e.tar.gz |
[FIX] Make np.random.shuffle less brain-dead
The logic in np.random.shuffle was... not very sensible. Fixes trac
ticket #2074.
This patch also exposes a completely unrelated issue in
numpy.testing. Filed as Github issue #347 and marked as knownfail for
now.
Diffstat (limited to 'numpy/testing')
-rw-r--r-- | numpy/testing/tests/test_utils.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index 067782dc0..bff8b50ab 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -369,11 +369,14 @@ class TestAssertAllclose(unittest.TestCase): class TestArrayAlmostEqualNulp(unittest.TestCase): + @dec.knownfailureif(True, "Github issue #347") def test_simple(self): - dev = np.random.randn(10) - x = np.ones(10) - y = x + dev * np.finfo(np.float64).eps - assert_array_almost_equal_nulp(x, y, nulp=2 * np.max(dev)) + np.random.seed(12345) + for i in xrange(100): + dev = np.random.randn(10) + x = np.ones(10) + y = x + dev * np.finfo(np.float64).eps + assert_array_almost_equal_nulp(x, y, nulp=2 * np.max(dev)) def test_simple2(self): x = np.random.randn(10) |