$OpenBSD: patch-numpy_core_tests_test_umath_py,v 1.1 2014/09/17 00:46:13 daniel Exp $

Silence a RuntimeWarning on np.log1p(np.nan)

See:
https://github.com/numpy/numpy/issues/5017

--- numpy/core/tests/test_umath.py.orig	Sun Sep 14 21:45:56 2014
+++ numpy/core/tests/test_umath.py	Sun Sep 14 21:47:56 2014
@@ -309,11 +309,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)
 
