Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy.linalg.eig does not normalize eigenvector if B is given (Trac #1308) #1834

Closed
scipy-gitbot opened this issue Apr 25, 2013 · 4 comments
Closed
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac scipy.linalg
Milestone

Comments

@scipy-gitbot
Copy link

Original ticket http://projects.scipy.org/scipy/ticket/1308 on 2010-10-16 by trac user nicki, assigned to unknown.

Hi all,

the title say it all.

Reproducible with

from scipy.linalg import eig
import numpy as np

A = np.array( [ [0.2, 0.4], [0.4, 2.05] ] )
B = np.array( [ [1.0, 0.0], [0.0, 1.0] ] )
print eig( A, B )

Cheers,
Nico

@scipy-gitbot
Copy link
Author

@WarrenWeckesser wrote on 2010-10-16

Thanks for the report.

You can enclose code in triple curly braces (that is, and) to preserve its formatting. Also, when you file a ticket, don't forget to select the component, if you know what it is.

@scipy-gitbot
Copy link
Author

@pv wrote on 2010-10-16

Here we return what LAPACK gives, and in this case it is "Each eigenvector is scaled so the largest component has abs(real part)+abs(imag. part)=1."

IMO, this can be fixed just by updating the documentation accordingly.

@scipy-gitbot
Copy link
Author

trac user nicki wrote on 2010-10-16

Note that this has some potential for confusion:

eig( A )

normalizes properly, and

eig( A, I )

with I being the identity matrix does not. Obviously this is how LAPACK is designed, but it seems flawed here.

Cheers,
Nico

@pv
Copy link
Member

pv commented Nov 16, 2013

Changed in gh-3055 to return unit normalized eigenvectors.

@pv pv closed this as completed Nov 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac scipy.linalg
Projects
None yet
Development

No branches or pull requests

2 participants