[Numpy-discussion] Heigenvalues is broken

Scott Ransom ransom at physics.mcgill.ca
Mon Nov 19 11:47:02 CST 2001


On November 19, 2001 02:36 pm, Jeff Whitaker wrote:
>
> This is definitely a hardware/compiler dependant feature.  I get the
> "right" answer on Solaris (with the forte compiler) but the same "wrong"
> answer as Alessandro on MacOS X/gcc.  I've tried fiddling with compiler
> options on my OS X box, to no avail.

But seemingly it is even stranger than this.  Here are my results from Debian 
unstable using Lapack 3.0 on an Athlon system:

Python 2.1.1 (#1, Nov 11 2001, 18:19:24)
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from LinearAlgebra import *
>>> a=array([[1,0],[0,1]])
>>> b=array([[0,1],[-1,0]])
>>> M=a+b*complex(0,1.0)
>>> Heigenvalues(M)
array([ 0.,  2.])

Scott


> On Sun, 18 Nov 2001, Travis Oliphant wrote:
> > On Sunday 18 November 2001 09:40 am, Alessandro Mirone wrote:
> > > Is it a problem of lapack3.0 of of
> > > LinearAlgebra.py?
> > > ..................... ==> (Eigenvalues should be (0,2))
> > >
> > > >>> a=array([[1,0],[0,1]])
> > > >>> b=array([[0,1],[-1,0]])
> > > >>> M=a+b*complex(0,1.0)
> > > >>> Heigenvalues(M)
> >
> > I suspect it is your lapack.  On an Athlon running Mandrake Linux with
> > the lapack-3.0-9 package, I get.
> >
> > >>> a=array([[1,0],[0,1]])
> > >>> b=array([[0,1],[-1,0]])
> > >>> M=a+b*complex(0,1.0)
> > >>> Heigenvalues(M)
> >
> > array([ 0.,  2.])
>
> This is definitely a hardware/compiler dependant feature.  I get the
> "right" answer on Solaris (with the forte compiler) but the same "wrong"
> answer as Alessandro on MacOS X/gcc.  I've tried fiddling with compiler
> options on my OS X box, to no avail.
>
> -Jeff
>
>  --
> Jeffrey S. Whitaker         Phone  : (303)497-6313
> Meteorologist               FAX    : (303)497-6449
> NOAA/OAR/CDC  R/CDC1        Email  : jsw at cdc.noaa.gov
> 325 Broadway                Web    : www.cdc.noaa.gov/~jsw
> Boulder, CO, USA 80303-3328 Office : Skaggs Research Cntr 1D-124
>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion

-- 
Scott M. Ransom              Address:  McGill Univ. Physics Dept.
Phone:  (514) 398-6492                 3600 University St., Rm 338
email:  ransom at physics.mcgill.ca       Montreal, QC  Canada H3A 2T8 
GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA B6FF FFD3 2989




More information about the Numpy-discussion mailing list