Problem diagonalizing a antisymmetric matrix in sympy

asked 2012-05-26 14:13:44 -0500

Shashank gravatar image

updated 2015-01-23 14:48:04 -0500

FrédéricC gravatar image

I am trying to diagonalize a anti-symmetric matrix in sympy. I constructed a random two by two anti-symmetric matrix in sympy and used the diagonalize command. It gives me an error saying it cannot calculate the eigenvectors. Is there a problem with sympy when the eigenvalues are purely imaginary?

import sympy
import numpy as np
mat1=np.random.rand(4)
m1=sympy.Matrix(2,2,mat1)
m2=-1.0e0*m1.transpose()
m=m1+m2
view(m)
m.diagonalize()
edit retag flag offensive close merge delete