[Scipy-svn] r5214 - trunk/scipy/sparse/linalg/dsolve

scipy-svn@scip... scipy-svn@scip...
Wed Dec 3 14:15:08 CST 2008


Author: ptvirtan
Date: 2008-12-03 14:14:56 -0600 (Wed, 03 Dec 2008)
New Revision: 5214

Modified:
   trunk/scipy/sparse/linalg/dsolve/linsolve.py
Log:
Issue UMFPACK deprecation warning when linsolve is used, not when it is imported

Modified: trunk/scipy/sparse/linalg/dsolve/linsolve.py
===================================================================
--- trunk/scipy/sparse/linalg/dsolve/linsolve.py	2008-12-01 04:08:07 UTC (rev 5213)
+++ trunk/scipy/sparse/linalg/dsolve/linsolve.py	2008-12-03 20:14:56 UTC (rev 5214)
@@ -15,10 +15,6 @@
 
 isUmfpack = hasattr( umfpack, 'UMFPACK_OK' )
 
-if isUmfpack and noScikit:
-    warn( 'scipy.sparse.linalg.dsolve.umfpack will be removed,'
-          ' install scikits.umfpack instead', DeprecationWarning )
-
 useUmfpack = True
 
 
@@ -77,6 +73,9 @@
 
 
     if isUmfpack and useUmfpack:
+        if noScikit:
+            warn( 'scipy.sparse.linalg.dsolve.umfpack will be removed,'\
+                    ' install scikits.umfpack instead', DeprecationWarning )
         if A.dtype.char not in 'dD':
             raise ValueError, "convert matrix data to double, please, using"\
                   " .astype(), or set linsolve.useUmfpack = False"
@@ -139,6 +138,10 @@
       x2 = solve( rhs2 ) # Uses again the LU factors.
     """
     if isUmfpack and useUmfpack:
+        if noScikit:
+            warn( 'scipy.sparse.linalg.dsolve.umfpack will be removed,'\
+                    ' install scikits.umfpack instead', DeprecationWarning )
+
         if not isspmatrix_csc(A):
             A = csc_matrix(A)
             warn('splu requires CSC matrix format', SparseEfficiencyWarning)



More information about the Scipy-svn mailing list