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

Robert Dick dickrp at wckn.com
Tue Nov 15 17:39:04 CST 2005

>> If you need to decide which one to change, identify the common case.  Is it
>> more common to access all dimensions of one eigenvector or access one
>> dimension of many eigenvectors?  The common case should be the easiest to
>> express, i.e., if one wants the first eigenvector, should
>>  la.eig(m)[1][0]
>> or
>>  la.eig(m)[1][:, 0]
>> be used?

Pearu Peterson:
> I am not convinced that getting eigenvectors one-by-one is the most common 
> case of la.eig usage. Sometimes one needs to operate with the whole matrix 
> of eigenvectors and then the mathematically "correct" representation of 
> the eigenmatrix would be more convinient.

Then let's go with the eig() convention (an eigenvector in each column).  It's 
not very dangerous because the function names are different.  Anybody 
implementing a backward-compatible scipy.Numeric will just need to transpose 
the results of eig() in an eigenvectors() wrapper.  The only real problem now 
is the conflict between the book and the code.

-Robert Dick-

More information about the SciPy-user mailing list