[Scipy-svn] r3067 - trunk/Lib/sandbox/lobpcg

scipy-svn@scip... scipy-svn@scip...
Fri Jun 1 03:48:02 CDT 2007


Author: rc
Date: 2007-06-01 03:47:46 -0500 (Fri, 01 Jun 2007)
New Revision: 3067

Modified:
   trunk/Lib/sandbox/lobpcg/lobpcg.py
Log:
fixed returning wrong eigenvectors


Modified: trunk/Lib/sandbox/lobpcg/lobpcg.py
===================================================================
--- trunk/Lib/sandbox/lobpcg/lobpcg.py	2007-06-01 08:21:52 UTC (rev 3066)
+++ trunk/Lib/sandbox/lobpcg/lobpcg.py	2007-06-01 08:47:46 UTC (rev 3067)
@@ -536,7 +536,7 @@
         blockVectorBX = sc.dot( blockVectorBX, eigBlockVectorX ) + bpp
 
         blockVectorP, blockVectorAP, blockVectorBP = pp, app, bpp
-
+        
     aux = blockVectorBX * _lambda[nm.newaxis,:]
     blockVectorR = blockVectorAX - aux
 
@@ -550,14 +550,14 @@
 
     if retLambdaHistory:
         if retResidualNormsHistory:
-            return _lambda, eigBlockVectorX, lambdaHistory, residualNormsHistory
+            return _lambda, blockVectorX, lambdaHistory, residualNormsHistory
         else:
-            return _lambda, eigBlockVectorX, lambdaHistory
+            return _lambda, blockVectorX, lambdaHistory
     else:
         if retResidualNormsHistory:
-            return _lambda, eigBlockVectorX, residualNormsHistory
+            return _lambda, blockVectorX, residualNormsHistory
         else:
-            return _lambda, eigBlockVectorX
+            return _lambda, blockVectorX
 
 ###########################################################################
 if __name__ == '__main__':
@@ -600,3 +600,4 @@
     print 'solution time:', time.clock() - tt
     print eigs
     
+    print vecs



More information about the Scipy-svn mailing list