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

Travis Oliphant oliphant at ee.byu.edu
Mon Nov 14 14:03:19 EST 2005


Fernando Perez wrote:

>Travis Oliphant wrote:
>  
>
>>Pearu Peterson wrote:
>>    
>>
>
>  
>
>>>This is a matter of definition. scipy.linalg.eig and 
>>>scipy.basic.linalg.eig return correct results according to their 
>>>documentation. Just scipy.linalg.eig assumes that eigenvectors are 
>>>returned column-wise, i.e.
>>>
>>> a * vr[:,i] = w[i] * vr[:,i]
>>>
>>>holds. While scipy.basic.linalg.eig, that is copied from Numeric, assumes 
>>>that eigenvectors are returned row-wise, i.e
>>>
>>>
>>> a * vr[i] = w[i] * vr[i]
>>>
>>>holds.
>>>
>>>
>>>      
>>>
>>Thanks for the clarification, Pearu.  I'm glad things are actually 
>>working as advertised.
>>    
>>
>
>If I may suggest, I think these two should be unified, though.  It will be 
>seriously disconcerting for new users to find that
>  
>
If the two are to be unified, I think scipy.basic should change.  But, 
that leads to a problem because of compatibility with Numeric. 

So, what to do?

We could change scipy.basic.linalg.eig  and keep 
scipy.basic.linalg.eigenvectors as the old Numeric behavior.

-Travis




More information about the SciPy-Dev mailing list