[SciPy-user] Proper Use of NumPy's eig()

Bryan Van de Ven bryanv@enthought....
Tue Feb 27 14:26:16 CST 2007

eig in in the linalg module, so you need to use

eigE = linalg.eig(E)

Rich Shepard wrote:
>    I start the module with
>  	from numpy import linalg
> and I need to find the principal Eigenvector of the matrix E. But, when I
> try
>  	eigE = eig(E)
> python responds "NameError: global name 'eig' is not defined."
>    Do I need another module from NumPy, should I explicitly cast E to a
> matrix, or am I calling the function incorrectly?
> Rich

More information about the SciPy-user mailing list