Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
scipy-gitbot opened this Issue · 4 comments

2 participants

@scipy-gitbot

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

@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

@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

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
Owner
pv commented

Changed in gh-3055 to return unit normalized eigenvectors.

@pv pv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.