[Numpy-discussion] Numeric eigenvectors problem on Linux

Konrad Hinsen hinsen at cnrs-orleans.fr
Thu Feb 5 06:51:44 CST 2004


On Tuesday 03 February 2004 23:43, Alexandre Gillet wrote:

> The same calculation return the correct value on Windows,SUN,SGI.
> All the Numeric were built without out modifying the setup.py file. I
> just run python setup.py install  (python2.3, Numeric 23.0)
>
> The test script we run is the following:
> import Numeric
> import LinearAlgebra
> e = Numeric.array([[ 0.6875,-0.3125,0.3125],
>                     [-0.3125 , 0.6875 , 0.3125],
>                     [ 0.3125 , 0.3125 , 0.6875]])
> evals, evecs = LinearAlgebra.eigenvectors(e)
> print "----------------------------------"
> print "evecs",evecs
>
>
> on Linux we  get:
> evals [ 1.      0.0625  1.    ]
> evecs [[ 0.81649658 -0.40824829  0.40824829]
> 	 [-0.57735027 -0.57735027  0.57735027]
>   	[-0.26840956  0.80201256  0.533603  ]]

I get the same results. Checking with

  print Numeric.dot(evecs, e)-evals[:, Numeric.NewAxis]*evecs

yields

array([[  0.00000000e+00,  -5.55111512e-17,   5.55111512e-17],
       [ -4.16333634e-17,  -4.16333634e-17,   4.16333634e-17],
       [  5.55111512e-17,   0.00000000e+00,   0.00000000e+00]])

which doesn't look so bad. What does the same test produce on your other 
machines?

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------





More information about the Numpy-discussion mailing list