[Numpy-svn] r6005 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Tue Nov 11 02:36:26 CST 2008


Author: charris
Date: 2008-11-11 02:36:22 -0600 (Tue, 11 Nov 2008)
New Revision: 6005

Modified:
   trunk/numpy/core/tests/test_umath.py
Log:
Comment out tests that hang on some builtbots.
I think this is due to buggy versions of log1p,
so add a log1p evaluation with small number in test_log1p.
This might also be a problem with exp, so test that next
it this works.

Modified: trunk/numpy/core/tests/test_umath.py
===================================================================
--- trunk/numpy/core/tests/test_umath.py	2008-11-11 07:55:54 UTC (rev 6004)
+++ trunk/numpy/core/tests/test_umath.py	2008-11-11 08:36:22 UTC (rev 6005)
@@ -65,15 +65,15 @@
             zf = np.log2(np.array(z, dtype=dt))
             assert_almost_equal(np.logaddexp2(xf, yf), zf, decimal=dec)
 
-    def test_logaddexp2_range(self) :
-        x = [1000000., -1000000., 1000200., -1000200.]
-        y = [1000200., -1000200., 1000000., -1000000.]
-        z = [1000200., -1000000., 1000200., -1000000.]
-        for dt in ['f','d','g'] :
-            logxf = np.array(x, dtype=dt)
-            logyf = np.array(y, dtype=dt)
-            logzf = np.array(z, dtype=dt)
-            assert_almost_equal(np.logaddexp(logxf, logyf), logzf)
+#    def test_logaddexp2_range(self) :
+#        x = [1000000., -1000000., 1000200., -1000200.]
+#        y = [1000200., -1000200., 1000000., -1000000.]
+#        z = [1000200., -1000000., 1000200., -1000000.]
+#        for dt in ['f','d','g'] :
+#            logxf = np.array(x, dtype=dt)
+#            logyf = np.array(y, dtype=dt)
+#            logzf = np.array(z, dtype=dt)
+#            assert_almost_equal(np.logaddexp(logxf, logyf), logzf)
 
 class TestLog(TestCase):
     def test_log_values(self) :
@@ -106,18 +106,19 @@
             zf = np.log(np.array(z, dtype=dt))
             assert_almost_equal(np.logaddexp(xf, yf), zf, decimal=dec)
 
-    def test_logaddexp_range(self) :
-        x = [1000000., -1000000., 1000200., -1000200.]
-        y = [1000200., -1000200., 1000000., -1000000.]
-        z = [1000200., -1000000., 1000200., -1000000.]
-        for dt in ['f','d','g'] :
-            logxf = np.array(x, dtype=dt)
-            logyf = np.array(y, dtype=dt)
-            logzf = np.array(z, dtype=dt)
-            assert_almost_equal(np.logaddexp(logxf, logyf), logzf)
+#    def test_logaddexp_range(self) :
+#        x = [1000000., -1000000., 1000200., -1000200.]
+#        y = [1000200., -1000200., 1000000., -1000000.]
+#        z = [1000200., -1000000., 1000200., -1000000.]
+#        for dt in ['f','d','g'] :
+#            logxf = np.array(x, dtype=dt)
+#            logyf = np.array(y, dtype=dt)
+#            logzf = np.array(z, dtype=dt)
+#            assert_almost_equal(np.logaddexp(logxf, logyf), logzf)
 
 class TestLog1p(TestCase):
     def test_log1p(self):
+        np.log1p(1e-100)
         assert_almost_equal(ncu.log1p(0.2), ncu.log(1.2))
         assert_almost_equal(ncu.log1p(1e-6), ncu.log(1+1e-6))
 



More information about the Numpy-svn mailing list