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

scipy-svn@scip... scipy-svn@scip...
Sat Dec 4 14:25:35 CST 2010


Author: ptvirtan
Date: 2010-12-04 14:25:34 -0600 (Sat, 04 Dec 2010)
New Revision: 6990

Modified:
   trunk/scipy/sparse/linalg/eigen/arpack/arpack.py
Log:
BUG: sparse/arpack: accept only real matrices in eigen_symmetric

Modified: trunk/scipy/sparse/linalg/eigen/arpack/arpack.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/arpack.py	2010-12-04 20:25:25 UTC (rev 6989)
+++ trunk/scipy/sparse/linalg/eigen/arpack/arpack.py	2010-12-04 20:25:34 UTC (rev 6990)
@@ -246,6 +246,8 @@
         self.workl = np.zeros(self.ncv * (self.ncv + 8), self.tp)
 
         ltr = _type_conv[self.tp]
+        if ltr not in ["s", "d"]:
+            raise ValueError("Input matrix is not real-valued.")
         self._arpack_solver = _arpack.__dict__[ltr + 'saupd']
         self._arpack_extract = _arpack.__dict__[ltr + 'seupd']
 



More information about the Scipy-svn mailing list