[Scipy-svn] r4441 - trunk/scipy/sparse/linalg/eigen/arpack

scipy-svn@scip... scipy-svn@scip...
Thu Jun 12 16:39:56 CDT 2008


Author: wnbell
Date: 2008-06-12 16:39:52 -0500 (Thu, 12 Jun 2008)
New Revision: 4441

Modified:
   trunk/scipy/sparse/linalg/eigen/arpack/arpack.py
Log:
fixed bug reported by James Philbin
http://thread.gmane.org/gmane.comp.python.scientific.user/16720


Modified: trunk/scipy/sparse/linalg/eigen/arpack/arpack.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/arpack.py	2008-06-12 11:26:55 UTC (rev 4440)
+++ trunk/scipy/sparse/linalg/eigen/arpack/arpack.py	2008-06-12 21:39:52 UTC (rev 4441)
@@ -460,12 +460,16 @@
         else:
             break
 
-    if  info < -1 :
-        raise RuntimeError("Error info=%d in arpack"%info)
+    if info < -1 :
+        raise RuntimeError("Error info=%d in arpack" % info)
         return None
-    if info == -1:
-        warnings.warn("Maximum number of iterations taken: %s"%iparam[2])
 
+    if info == 1:
+        warnings.warn("Maximum number of iterations taken: %s" % iparam[2])
+
+    if iparam[4] < k:
+        warnings.warn("Only %d/%d eigenvectors converged" % (iparam[4], k))
+
     # now extract eigenvalues and (optionally) eigenvectors
     rvec = return_eigenvectors
     ierr = 0



More information about the Scipy-svn mailing list