[Scipy-svn] r7036 - in trunk/scipy: lib/blas/tests linalg/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Sat Jan 15 07:43:37 EST 2011


Author: rgommers
Date: 2011-01-15 06:43:36 -0600 (Sat, 15 Jan 2011)
New Revision: 7036

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

Modified: trunk/scipy/lib/blas/tests/test_fblas.py
===================================================================
--- trunk/scipy/lib/blas/tests/test_fblas.py	2011-01-15 12:42:40 UTC (rev 7035)
+++ trunk/scipy/lib/blas/tests/test_fblas.py	2011-01-15 12:43:36 UTC (rev 7036)
@@ -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: trunk/scipy/linalg/tests/test_decomp.py
===================================================================
--- trunk/scipy/linalg/tests/test_decomp.py	2011-01-15 12:42:40 UTC (rev 7035)
+++ trunk/scipy/linalg/tests/test_decomp.py	2011-01-15 12:43:36 UTC (rev 7036)
@@ -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: trunk/scipy/linalg/tests/test_fblas.py
===================================================================
--- trunk/scipy/linalg/tests/test_fblas.py	2011-01-15 12:42:40 UTC (rev 7035)
+++ trunk/scipy/linalg/tests/test_fblas.py	2011-01-15 12:43:36 UTC (rev 7036)
@@ -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