[Numpy-discussion] test failure: Ticket 396

Robin robince@gmail....
Fri Nov 16 12:25:12 CST 2007


Hello,

Just thought I'd report this test failure with current svn (rev 4464)
on Mac OS X 10.5 (could be a leopard issue?) since I hadn't seen it
mentioned before.
Oddly it only seems to fail in ipython, importing and running from the
normal python interpreter all the tests pass.

Actually, it only seems to fail when I start ipython with
ipython -p scipy
I haven't been able to recreate the problem with any other combination
of startup and imports.

Here is my ipythonrc-scipy:
# load our basic configuration with generic options
include ipythonrc

# import ...
# Load Numpy an SciPy by themselves so that 'help' works on them
import_mod numpy scipy

# from ... import ...
import_some

# Now we load all of SciPy
# from ... import *
import_all numpy
import_all scipy

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

Here is the error:
======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/tests/test_regression.py",
line 600, in check_poly1d_nan_roots
    self.failUnlessRaises(N.linalg.LinAlgError,getattr,p,"r")
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py",
line 320, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/lib/polynomial.py",
line 623, in __getattr__
    return roots(self.coeffs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/lib/polynomial.py",
line 124, in roots
    roots = _eigvals(A)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/lib/polynomial.py",
line 40, in _eigvals
    return eigvals(arg)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/linalg/decomp.py",
line 378, in eigvals
    return eig(a,b=b,left=0,right=0,overwrite_a=overwrite_a)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/linalg/decomp.py",
line 128, in eig
    a1 = asarray_chkfinite(a)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/lib/function_base.py",
line 398, in asarray_chkfinite
    raise ValueError, "array must not contain infs or NaNs"
ValueError: array must not contain infs or NaNs

----------------------------------------------------------------------
Ran 692 tests in 0.456s

FAILED (errors=1)
Out[2]: <unittest._TextTestResult run=692 errors=1 failures=0>

Thanks,

Robin


More information about the Numpy-discussion mailing list