[SciPy-Dev] balancing matrices before computing eigenvalues

Jason Grout jason-sage at creativetrax.com
Fri Sep 16 04:29:49 EDT 2011


I recently ran into some significant roundoff error when computing the 
eigenvalues and eigenvectors of a matrix with condition number around 
3000.  I didn't have this problem with matlab.  Reading the matlab 
documentation revealed that matlab, by default, balances the matrix 
before computing the eigenvalues/eigenvectors [1].  Presumably, they use 
something like dgebal or dggbal [2] from lapack.  Does scipy do any sort 
of balancing before computing eigenvalues/eigenvectors?

Thanks,

Jason

[1] http://www.mathworks.com/help/techdoc/ref/eig.html

[2] http://www.netlib.org/lapack/lapack-3.1.1/html/dgebal.f.html



More information about the SciPy-Dev mailing list