Updates:
Labels: -Priority-Medium Priority-High
Comment #1 on issue 3343 by [email protected]: bug in eigenvect()
http://code.google.com/p/sympy/issues/detail?id=3343
Here is the changed function and old function from laga.py
def printeigen(M, precision=4): # Print eigenvalues, multiplicities,
eigenvectors of M.
# Temporary version until sympy.eigenvects is fixed.
from numpy import linalg
B = Sym2NumArray(M)
w, v = linalg.eig(B)
for i in range(0,len(w)):
print 'Evalue =', round(w[i],precision),
print 'Evector =',
result = '['
for j in range(0,len(w)):
result += str(round(v[i][j],precision))
if j != len(w)-1:
result += ', '
result += ']'
print result
print
# Reinstate this version when sympy.eigenvects is fixed.
#def printeigen(M): # Print eigenvalues, multiplicities, eigenvectors of
M.
#Nit(M)
#evects = M.eigenvects()
#for i in range(0,len(evects)):
#print 'Eigenvalue =', evects[i][0], ' Multiplicity =',
evects[i][1],
#print 'Eigenvector =',
#result = '['
#for j in range(0,len(evects)):
#result += str(trigsimp(evects[i][2][0][j]).evalf(3))
#if j != len(evects)-1:
#result += ', '
#result += ']'
#print result
#print
I agree that we should contact the author.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.