diff options
author | Oleksandr Pavlyk <oleksandr.pavlyk@intel.com> | 2019-07-26 13:29:29 -0500 |
---|---|---|
committer | Oleksandr Pavlyk <oleksandr.pavlyk@intel.com> | 2019-07-29 08:17:52 -0500 |
commit | 31730ea7693afa61ebd654e5a52806bb1959c448 (patch) | |
tree | 41ea078cfd7a9beed620de38ade36e1fee472944 | |
parent | 5826355b38b1f1dc1c2e1305cda8a8dfdfe54aca (diff) | |
download | numpy-31730ea7693afa61ebd654e5a52806bb1959c448.tar.gz |
Allow fuss in testing strided/non-strided exp/log loops
This is related to:
https://github.com/numpy/numpy/issues/14087
https://github.com/numpy/numpy/pull/14091
-rw-r--r-- | numpy/core/tests/test_umath.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index d2ce74282..91d403d98 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -14,7 +14,7 @@ from numpy.testing import ( assert_, assert_equal, assert_raises, assert_raises_regex, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_array_max_ulp, assert_allclose, assert_no_warnings, suppress_warnings, - _gen_alignment_data + _gen_alignment_data, assert_array_almost_equal_nulp ) def on_powerpc(): @@ -700,8 +700,8 @@ class TestExpLogFloat32(object): exp_true = np.exp(x_f32) log_true = np.log(x_f32) for jj in strides: - assert_equal(np.exp(x_f32[::jj]), exp_true[::jj]) - assert_equal(np.log(x_f32[::jj]), log_true[::jj]) + assert_array_almost_equal_nulp(np.exp(x_f32[::jj]), exp_true[::jj], nulp=2) + assert_array_almost_equal_nulp(np.log(x_f32[::jj]), log_true[::jj], nulp=2) class TestLogAddExp(_FilterInvalids): def test_logaddexp_values(self): |