[Numpy-discussion] One question about the numpy.linalg.eig() routine

Hongbin Zhang hongbin_zhang82@hotmail....
Mon Apr 2 16:35:06 CDT 2012

Dear Python-users,
I am currently very confused about the Scipy routine to obtain the eigenvectors of a complex matrix.In attached you find two files to diagonalize a 2X2 complex Hermitian matrix, however, on my computer,
If I run python, I got:
[[ 0.80322132+0.j          0.59500941+0.02827207j] [-0.59500941+0.02827207j  0.80322132+0.j        ]]
If I compile the fortran code, I got:
 ( -0.595009410289, -0.028272068905) (  0.802316135182,  0.038122316497) ( -0.803221321796,  0.000000000000) ( -0.595680709955,  0.000000000000)
>From the scipy webpage, it is said that numpy.linalg.eig() provides nothing butan interface to lapack zheevd subroutine, which is used in my fortran code.
Would somebody be kind to tell me how to get consistent results?
Many thanks in advance.
Best wishes,

                                                        Ad hoc, ad loc and quid pro quo                                                                                                                ---   Jeremy Hilary Boob 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120403/2f574a9a/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2X2.f90
Url: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120403/2f574a9a/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2X2.py
Type: text/x-script.phyton
Size: 144 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120403/2f574a9a/attachment.bin 

More information about the NumPy-Discussion mailing list