diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2014-08-29 09:01:42 -0600 |
|---|---|---|
| committer | Charles Harris <charlesr.harris@gmail.com> | 2014-08-29 09:05:22 -0600 |
| commit | affeaf54bd08f42c87d966f03cbdc8a896d4e90f (patch) | |
| tree | 4e33e070f1f9d051d514f6421465febec5ccc283 /numpy/core | |
| parent | bbb7c3fbcdc2ddfcf79317661be2b99b1f6617e3 (diff) | |
| download | numpy-affeaf54bd08f42c87d966f03cbdc8a896d4e90f.tar.gz | |
TST: Silence some warning that turns up on OpenBSD.
On OpenBSD with gcc-4.2 log1p(nan) raises an invalid value warning.
This PR disables both 'divide' and 'invalid' for the log1p tests.
Closes #5017.
Diffstat (limited to 'numpy/core')
| -rw-r--r-- | numpy/core/tests/test_umath.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index b3ddc2398..72ba1d5c7 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -333,11 +333,10 @@ class TestLog1p(TestCase): assert_almost_equal(ncu.log1p(1e-6), ncu.log(1+1e-6)) def test_special(self): - assert_equal(ncu.log1p(np.nan), np.nan) - assert_equal(ncu.log1p(np.inf), np.inf) - with np.errstate(divide="ignore"): + with np.errstate(invalid="ignore", divide="ignore"): + assert_equal(ncu.log1p(np.nan), np.nan) + assert_equal(ncu.log1p(np.inf), np.inf) assert_equal(ncu.log1p(-1.), -np.inf) - with np.errstate(invalid="ignore"): assert_equal(ncu.log1p(-2.), np.nan) assert_equal(ncu.log1p(-np.inf), np.nan) |
