[Scipy-svn] r7059 - in branches/0.9.x/scipy: lib/blas/tests linalg/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Sun Jan 16 10:15:53 EST 2011


Author: rgommers
Date: 2011-01-16 09:15:41 -0600 (Sun, 16 Jan 2011)
New Revision: 7059

Modified:
   branches/0.9.x/scipy/lib/blas/tests/test_fblas.py
   branches/0.9.x/scipy/linalg/tests/test_decomp.py
   branches/0.9.x/scipy/linalg/tests/test_fblas.py
Log:
TST: filter ComplexWarning from fblas tests.

(backport of r7036)

Modified: branches/0.9.x/scipy/lib/blas/tests/test_fblas.py
===================================================================
--- branches/0.9.x/scipy/lib/blas/tests/test_fblas.py	2011-01-16 15:01:59 UTC (rev 7058)
+++ branches/0.9.x/scipy/lib/blas/tests/test_fblas.py	2011-01-16 15:15:41 UTC (rev 7059)
@@ -89,7 +89,7 @@
         assert_(0)
 
     def test_y_bad_size(self):
-        x = arange(12.,dtype=complex64)
+        x = arange(12.,dtype=self.dtype)
         y = zeros(6,x.dtype)
         try:
             self.blas_func(x,y,n=3,incy=5)
@@ -217,7 +217,7 @@
         assert_(0)
 
     def test_y_bad_size(self):
-        x = arange(12.,dtype=complex64)
+        x = arange(12.,dtype=self.dtype)
         y = zeros(6,x.dtype)
         try:
             self.blas_func(x,y,n=3,incy=5)
@@ -310,7 +310,7 @@
         assert_(0)
 
     def test_y_bad_size(self):
-        x = arange(12.,dtype=complex64)
+        x = arange(12.,dtype=self.dtype)
         y = zeros(6,x.dtype)
         try:
             self.blas_func(x,y,n=3,incy=5)

Modified: branches/0.9.x/scipy/linalg/tests/test_decomp.py
===================================================================
--- branches/0.9.x/scipy/linalg/tests/test_decomp.py	2011-01-16 15:01:59 UTC (rev 7058)
+++ branches/0.9.x/scipy/linalg/tests/test_decomp.py	2011-01-16 15:15:41 UTC (rev 7059)
@@ -197,7 +197,11 @@
         B = array(( [13,26,25,17,24], [31,46,40,26,37], [26,40,19,25,25],
             [16,25,27,14,23], [24,35,18,21,22]))
 
-        self._check_gen_eig(A, B)
+        olderr = np.seterr(all='ignore')
+        try:
+            self._check_gen_eig(A, B)
+        finally:
+            np.seterr(**olderr)
 
     def test_falker(self):
         """Test matrices giving some Nan generalized eigen values."""
@@ -209,7 +213,11 @@
         A = bmat([[I,Z],[Z,-K]])
         B = bmat([[Z,I],[M,D]])
 
-        self._check_gen_eig(A, B)
+        olderr = np.seterr(all='ignore')
+        try:
+            self._check_gen_eig(A, B)
+        finally:
+            np.seterr(**olderr)
 
     def test_bad_geneig(self):
         # Ticket #709 (strange return values from DGGEV)
@@ -229,9 +237,13 @@
 
         # With a buggy LAPACK, this can fail for different omega on different
         # machines -- so we need to test several values
-        for k in xrange(100):
-            A, B = matrices(omega=k*5./100)
-            self._check_gen_eig(A, B)
+        olderr = np.seterr(all='ignore')
+        try:
+            for k in xrange(100):
+                A, B = matrices(omega=k*5./100)
+                self._check_gen_eig(A, B)
+        finally:
+            np.seterr(**olderr)
 
     def test_not_square_error(self):
         """Check that passing a non-square array raises a ValueError."""

Modified: branches/0.9.x/scipy/linalg/tests/test_fblas.py
===================================================================
--- branches/0.9.x/scipy/linalg/tests/test_fblas.py	2011-01-16 15:01:59 UTC (rev 7058)
+++ branches/0.9.x/scipy/linalg/tests/test_fblas.py	2011-01-16 15:15:41 UTC (rev 7059)
@@ -90,7 +90,7 @@
         assert_(0)
 
     def test_y_bad_size(self):
-        x = arange(12.,dtype=complex64)
+        x = arange(12.,dtype=self.dtype)
         y = zeros(6,x.dtype)
         try:
             self.blas_func(x,y,n=3,incy=5)
@@ -214,7 +214,7 @@
         assert_(0)
 
     def test_y_bad_size(self):
-        x = arange(12.,dtype=complex64)
+        x = arange(12.,dtype=self.dtype)
         y = zeros(6,x.dtype)
         try:
             self.blas_func(x,y,n=3,incy=5)
@@ -306,7 +306,7 @@
         assert_(0)
 
     def test_y_bad_size(self):
-        x = arange(12.,dtype=complex64)
+        x = arange(12.,dtype=self.dtype)
         y = zeros(6,x.dtype)
         try:
             self.blas_func(x,y,n=3,incy=5)




More information about the Scipy-svn mailing list