[Scipy-svn] r5037 - trunk/scipy/lib/lapack/tests

scipy-svn@scip... scipy-svn@scip...
Mon Nov 10 06:36:09 CST 2008


Author: cdavid
Date: 2008-11-10 06:36:01 -0600 (Mon, 10 Nov 2008)
New Revision: 5037

Modified:
   trunk/scipy/lib/lapack/tests/esv_tests.py
Log:
Add the decimal precision when comparing results for scipy.lib.lapack.

Modified: trunk/scipy/lib/lapack/tests/esv_tests.py
===================================================================
--- trunk/scipy/lib/lapack/tests/esv_tests.py	2008-11-10 12:35:41 UTC (rev 5036)
+++ trunk/scipy/lib/lapack/tests/esv_tests.py	2008-11-10 12:36:01 UTC (rev 5037)
@@ -43,9 +43,9 @@
         f = getattr(self.lapack,sym+'evr')
         w,v,info = f(a)
         assert not info,`info`
-        assert_array_almost_equal(w,exact_w)
+        assert_array_almost_equal(w,exact_w, decimal=self.decimal)
         for i in range(3):
-            assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
+            assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i], decimal=self.decimal)
 
 ##    def check_heevr_complex(self):
 ##        a= [[1,2-2j,3+7j],[2+2j,2,3],[3-7j,3,5]]
@@ -73,9 +73,9 @@
         rslice = slice(irange[0],irange[1]+1)
         m = irange[1] - irange[0] + 1
         assert_equal(len(w),m)
-        assert_array_almost_equal(w,exact_w[rslice])
+        assert_array_almost_equal(w,exact_w[rslice], decimal=self.decimal)
         for i in range(m):
-            assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
+            assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i], decimal=self.decimal)
 
     def check_syevr_irange_low(self): self.check_syevr_irange(irange=[0,1])
 



More information about the Scipy-svn mailing list