diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-03-13 11:42:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-13 11:42:44 -0600 |
commit | 5f84b380f3708e94196582e427356cc38d76b977 (patch) | |
tree | c06f6f84493338963ff484e0d374e95d665562e4 /numpy/testing/tests/test_utils.py | |
parent | fd60d2c8c4df02d1038105fb2b215744775daa74 (diff) | |
download | numpy-5f84b380f3708e94196582e427356cc38d76b977.tar.gz |
MAINT: Increase range in float16 almost equal nulp test.
Diffstat (limited to 'numpy/testing/tests/test_utils.py')
-rw-r--r-- | numpy/testing/tests/test_utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index 7727e552f..a97b627f9 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -913,7 +913,8 @@ class TestArrayAlmostEqualNulp(unittest.TestCase): def test_float16_pass(self): nulp = 5 - x = np.linspace(-20, 20, 50, dtype=np.float16) + x = np.linspace(-4, 4, 10, dtype=np.float16) + x = 10**x x = np.r_[-x, x] eps = np.finfo(x.dtype).eps @@ -926,7 +927,8 @@ class TestArrayAlmostEqualNulp(unittest.TestCase): def test_float16_fail(self): nulp = 5 - x = np.linspace(-20, 20, 50, dtype=np.float16) + x = np.linspace(-4, 4, 10, dtype=np.float16) + x = 10**x x = np.r_[-x, x] eps = np.finfo(x.dtype).eps |