[SciPy-dev] Type handling of matrices

Norbert Nemec Norbert.Nemec.list at gmx.de
Wed Nov 17 04:32:43 CST 2004


On Wednesday 17 November 2004 10:37, Pearu Peterson wrote:
> On Wed, 17 Nov 2004, Norbert Nemec wrote:
> > def gap(A):
> > 	w = sort(real(linalg.eigwals(A)))
> > 	return min(w[1:]-w[:-1])/2
>
> This would give incorrect result, wouldn't it? Try A with all eigenvalues
> being imaginary, for example.

True - it only works for real eigenvalues. In many cases, though, this is 
given.


-- 
_________________________________________Norbert Nemec
         Bernhardstr. 2 ... D-93053 Regensburg
     Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199
           eMail: <Norbert at Nemec-online.de>




More information about the Scipy-dev mailing list