summaryrefslogtreecommitdiff
path: root/numpy/testing
diff options
context:
space:
mode:
authornjsmith <njs@pobox.com>2012-07-17 16:36:05 -0700
committernjsmith <njs@pobox.com>2012-07-17 16:36:05 -0700
commitbf2c101136d7a28eb04794f24ffaaa251f4ca603 (patch)
treefe0205893957cd9bdf3c09ecee09d0aa9a23b058 /numpy/testing
parent6c772fab57934d24b66638ea5001eb02d1662f5e (diff)
parentb26c675e2a91e1042f8f8d634763942c87fbbb6e (diff)
downloadnumpy-bf2c101136d7a28eb04794f24ffaaa251f4ca603.tar.gz
Merge pull request #348 from njsmith/fix-shuffle
[FIX] Make np.random.shuffle less brain-dead
Diffstat (limited to 'numpy/testing')
-rw-r--r--numpy/testing/tests/test_utils.py11
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)