[Matrix-SIG] Eigenvalues return array

Robert Kern kernr@ncifcrf.gov
Sat, 05 Dec 1998 21:07:40 -0500


This code on my Windows95 machine running Python 1.5.1 and Numerical
Python 1.6:

%---------------------------------------------------------------------
# eigenvalues return array test case

import Numeric
import LinearAlgebra

a = Numeric.array([[0.4, 0.7],
                   [0.6, 0.3]])

eigenvals = LinearAlgebra.eigenvalues(a)
print eigenvals # This prints 'array([ 1. , -0.3])'

print Numeric.equal(eigenvals, 1.0) # This prints 'array([0, 0])'
%---------------------------------------------------------------------

doesn't seem to be give the right results with the 'equals' comparison.
Note that 'Numeric.equal(Numeric.array([1., -0.3]), 1.)' returns the
correct 'array([1, 0])'.  Is this a fixable bug?

-- 
Robert Kern           |
----------------------|"In the fields of Hell where the grass grows high
This space            | Are the graves of dreams allowed to die."
intentionally         |           - Richard Harter
left blank.           |