[SciPy-user] scipy.linalg.eig() returns transposed eigenvector matrix

Robert Dick dickrp at wckn.com
Sun Nov 13 20:59:28 CST 2005


scipy.linalg.eig() returns transposed eigenvector matrix

Results with old Numeric:
>>> import LinearAlgebra as la
>>> from Numeric import *
>>> la.eigenvectors(array([[1.0, 1.0], [1.0, 1.0]]))
(array([ 2.,  0.]), array([[ 0.70710678,  0.70710678],
       [-0.70710678,  0.70710678]]))

Results with svn current SciPy linked against AMD ACML BLAS/LAPACK.

>>> import scipy.linalg as la
>>> from scipy import *
>>> la.eig(array([[1.0, 1.0], [1.0, 1.0]]))
(array([ 2.+0.j,  0.+0.j]), array([[ 0.70710678, -0.70710678],
       [ 0.70710678,  0.70710678]]))
>>> la.eig(array([[1.0, 1.0], [1.0, 1.0]]))[1].transpose()
array([[ 0.70710678,  0.70710678],
       [-0.70710678,  0.70710678]])

Can somebody else reproduce this?

This result contradicts the documentation.  I'm linking against the AMD ACML 
BLAS/LAPACK library and indicating that f77 was used.  That library has 
vanilla f77 routines as well as C wrappers.  The C wrappers assume column 
major matrices (f77-style).  However, that shouldn't have mattered because 
the f77 routines should have been used.

-Robert Dick-



More information about the SciPy-user mailing list