[Scipy-svn] r6759 - trunk/scipy/optimize/tests

scipy-svn@scip... scipy-svn@scip...
Sat Sep 11 20:00:08 CDT 2010


Author: ptvirtan
Date: 2010-09-11 20:00:08 -0500 (Sat, 11 Sep 2010)
New Revision: 6759

Modified:
   trunk/scipy/optimize/tests/test_linesearch.py
   trunk/scipy/optimize/tests/test_optimize.py
Log:
TST: optimize: bump test tolerance in fmin_ncg -- the exact optimization trace is 1e-6 sensitive to numerical noise

Modified: trunk/scipy/optimize/tests/test_linesearch.py
===================================================================
--- trunk/scipy/optimize/tests/test_linesearch.py	2010-09-12 00:59:53 UTC (rev 6758)
+++ trunk/scipy/optimize/tests/test_linesearch.py	2010-09-12 01:00:08 UTC (rev 6759)
@@ -123,9 +123,9 @@
             c += 1
             s, phi1, phi0 = ls.scalar_search_wolfe1(phi, derphi, phi(0),
                                                     old_phi0, derphi(0))
-            assert_equal(phi0, phi(0))
-            assert_equal(phi1, phi(s))
-            assert_wolfe(s, phi, derphi)
+            assert_equal(phi0, phi(0), name)
+            assert_equal(phi1, phi(s), name)
+            assert_wolfe(s, phi, derphi, err_msg=name)
 
         assert c > 3 # check that the iterator really works...
 

Modified: trunk/scipy/optimize/tests/test_optimize.py
===================================================================
--- trunk/scipy/optimize/tests/test_optimize.py	2010-09-12 00:59:53 UTC (rev 6758)
+++ trunk/scipy/optimize/tests/test_optimize.py	2010-09-12 01:00:08 UTC (rev 6759)
@@ -181,7 +181,7 @@
         assert np.allclose(self.trace[3:5],
                            [[-4.35700753e-07, -5.24869435e-01, 4.87527480e-01],
                             [-4.35700753e-07, -5.24869401e-01, 4.87527774e-01]],
-                           atol=1e-14, rtol=1e-7), self.trace[3:5]
+                           atol=1e-6, rtol=1e-7), self.trace[:5]
 
 
     def test_l_bfgs_b(self):



More information about the Scipy-svn mailing list