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

scipy-svn@scip... scipy-svn@scip...
Sat Oct 23 09:41:17 CDT 2010


Author: ptvirtan
Date: 2010-10-23 09:41:16 -0500 (Sat, 23 Oct 2010)
New Revision: 6852

Modified:
   trunk/scipy/sparse/linalg/eigen/arpack/arpack.py
Log:
BUG: sparse/arpack: fix ARPACK overwriting the initial vector (#1313)

Modified: trunk/scipy/sparse/linalg/eigen/arpack/arpack.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/arpack.py	2010-10-23 14:40:53 UTC (rev 6851)
+++ trunk/scipy/sparse/linalg/eigen/arpack/arpack.py	2010-10-23 14:41:16 UTC (rev 6852)
@@ -68,7 +68,8 @@
             raise ValueError("matrix type must be 'f', 'd', 'F', or 'D'")
 
         if v0 is not None:
-            self.resid = v0
+            # ARPACK overwrites its initial resid,  make a copy
+            self.resid = np.array(v0, copy=True)
             info = 1
         else:
             self.resid = np.zeros(n, tp)



More information about the Scipy-svn mailing list