[Numpy-discussion] code using Numeric and LinearAlgebra

Robert Kern robert.kern at gmail.com
Mon Mar 31 22:51:42 EDT 2008


On Mon, Mar 31, 2008 at 6:06 PM, gordon <nodrogbrown at gmail.com> wrote:
> i came across some code that uses calls like
>  LinearAlgebra.eigenvectors(L) and Numeric.matrixmultiply(v, x) which
>  gives compilation errors on my new numpy installation.Is it possible
>  to get such code compiled while using new version of numpy?
>
>  when evalues, evectors = LinearAlgebra.eigenvectors(L) is computed for
>  a symmetric covariance matrix L ,how are eigenvectors arranged in
>  evectors? are they in columns?can i simply replace the above  call by
>  linalg.eigh()?

Columns, yes, and yes.

>  Similarly can i just replace Numeric.matrixmultiply(v, x) with
>  numpy.dot() ,

Yes. matrixmultiply() was a deprecated alias even in Numeric.

>  or is there something i must watch for in the above two cases?

Not particularly, no.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco



More information about the NumPy-Discussion mailing list