[SciPy-dev] Strange bug in linalg

Norbert Nemec Norbert.Nemec.list at gmx.de
Mon Nov 15 06:22:01 CST 2004


Hi there,

the following code shows a really strange bug:

-----------------------------

> from numarray import *
> from scipy.linalg import *
> print array([[1.0]])
> print eig(array([[1.0,1.0j],[-1.0j,1.0j]]))

------------------------------

running the code causes a "Floating point exception" on the last line
that cannot even be handled with python code (even ipython crashed on
that exception!)

Dropping the first print command or even changing it to a dummy
assignment causes the eigenvalue calculation to work correctly, but
turning the second print into an assignment does not solve the problem.

It seems therefore like printing an array "prepares" the bug and
calculating eigenvalues of some other array then "triggers" it...

I failed horribly in tracking down this bug. Maybe someone else might
see it as a challenge? I'm really curious what this might turn out to be!

(I'm using CVS versions of numarray and scipy on Python 2.3.4)

Ciao,
Nobbi




More information about the Scipy-dev mailing list