From: Alessandro M. <ale...@wa...> - 2001-11-18 15:41:07
|
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) array([-2.30277564, 1.30277564]) >>> print M [[ 1.+0.j 0.+1.j] [ 0.-1.j 1.+0.j]] >>> |
From: Travis O. <oli...@ie...> - 2001-11-19 03:00:33
|
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.]) -Travis |
From: Jeff W. <js...@cd...> - 2001-11-19 19:36:47
|
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 : js...@cd... 325 Broadway Web : www.cdc.noaa.gov/~jsw Boulder, CO, USA 80303-3328 Office : Skaggs Research Cntr 1D-124 |
From: Scott R. <ra...@ph...> - 2001-11-19 19:46:23
|
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 : js...@cd... > 325 Broadway Web : www.cdc.noaa.gov/~jsw > Boulder, CO, USA 80303-3328 Office : Skaggs Research Cntr 1D-124 > > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > 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: ra...@ph... Montreal, QC Canada H3A 2T8 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 |
From: Nils W. <nw...@me...> - 2001-11-19 07:57:12
|
Alessandro Mirone schrieb: > > 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) > array([-2.30277564, 1.30277564]) > >>> print M > [[ 1.+0.j 0.+1.j] > [ 0.-1.j 1.+0.j]] > >>> > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion On an Athlon running SuSE Linux 7.3 with the lapack-3.0-0 package, I get. [-2.30277564 1.30277564] Nils |