mailr21108 - /trunk/lib/linear_algebra/matrix_exponential.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 15, 2013 - 11:34:
Author: bugman
Date: Tue Oct 15 11:34:11 2013
New Revision: 21108

URL: http://svn.gna.org/viewcvs/relax?rev=21108&view=rev
Log:
The lib.linear_algebra.matrix_exponential.matrix_exponential() function now 
uses lib.check_types.is_complex().

This fixes the function for complex matrices.


Modified:
    trunk/lib/linear_algebra/matrix_exponential.py

Modified: trunk/lib/linear_algebra/matrix_exponential.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/linear_algebra/matrix_exponential.py?rev=21108&r1=21107&r2=21108&view=diff
==============================================================================
--- trunk/lib/linear_algebra/matrix_exponential.py (original)
+++ trunk/lib/linear_algebra/matrix_exponential.py Tue Oct 15 11:34:11 2013
@@ -26,6 +26,9 @@
 from numpy import diag, dot, exp, iscomplex
 from numpy.linalg import eig, inv
 
+# relax module imports.
+from lib.check_types import is_complex
+
 
 def matrix_exponential(A):
     """Calculate the exact matrix exponential using the eigenvalue 
decomposition approach.
@@ -37,7 +40,7 @@
     """
 
     # Is the original matrix real?
-    complex_flag = iscomplex(A[0][0])
+    complex_flag = is_complex(A[0, 0])
 
     # The eigenvalue decomposition.
     W, V = eig(A)




Related Messages


Powered by MHonArc, Updated Tue Oct 15 12:00:01 2013