[Numpy-discussion] Eigenvectors in Matlab vs. Numpy

Robert Kern robert.kern@gmail....
Sun Jun 29 21:35:47 CDT 2008


On Sun, Jun 29, 2008 at 21:14, Saket <saketn@gmail.com> wrote:
> Also, I'm getting different numbers when I do the above using eig(A)
> and eigh(A). I thought eigh would be faster, but would still give the
> same results...

What different numbers? Remember, as Chuck pointed out, you have a
multiplicity of -1 eigenvalues, so the actual eigenvectors
corresponding to those eigenvalues are not uniquely determined. The
details of the algorithm will determine exactly which ones you get.
eigh() has a different algorithm than eig(); that's the reason that it
is faster.

-- 
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