[Numpy-discussion] numpy.test() (failures=2, errors=3)

Nils Wagner nwagner@iam.uni-stuttgart...
Sat May 24 07:54:04 CDT 2008


Hi all,

I found two failures and three errors wrt numpy.test()

             numpy.__version__

'1.2.0.dev5228'

======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/core/tests/test_regression.py", 
line 602, in check_poly1d_nan_roo
     self.failUnlessRaises(np.linalg.LinAlgError,getattr,p,"r")
   File "/usr/lib64/python2.5/unittest.py", line 320, in 
failUnlessRaises
     callableObj(*args, **kwargs)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/polynomial.py", 
line 661, in __getattr__
     return roots(self.coeffs)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/polynomial.py", 
line 124, in roots
     roots = _eigvals(A)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/polynomial.py", 
line 40, in _eigvals
     return eigvals(arg)
   File 
"/usr/local/lib64/python2.5/site-packages/scipy/linalg/decomp.py", 
line 478, in eigvals
     return 
eig(a,b=b,left=0,right=0,overwrite_a=overwrite_a)
   File 
"/usr/local/lib64/python2.5/site-packages/scipy/linalg/decomp.py", 
line 150, in eig
     a1 = asarray_chkfinite(a)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/function_base.py", 
line 527, in asarray_chkfinite
     raise ValueError, "array must not contain infs or 
NaNs"
ValueError: array must not contain infs or NaNs

======================================================================
ERROR: Ticket #396
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/core/tests/test_regression.py", 
line 602, in check_poly1d_nan_roo
     self.failUnlessRaises(np.linalg.LinAlgError,getattr,p,"r")
   File "/usr/lib64/python2.5/unittest.py", line 320, in 
failUnlessRaises
     callableObj(*args, **kwargs)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/polynomial.py", 
line 661, in __getattr__
     return roots(self.coeffs)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/polynomial.py", 
line 124, in roots
     roots = _eigvals(A)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/polynomial.py", 
line 37, in _eigvals
     return eigvals(arg)
   File 
"/usr/local/lib64/python2.5/site-packages/scipy/linalg/decomp.py", 
line 478, in eigvals
     return 
eig(a,b=b,left=0,right=0,overwrite_a=overwrite_a)
   File 
"/usr/local/lib64/python2.5/site-packages/scipy/linalg/decomp.py", 
line 150, in eig
     a1 = asarray_chkfinite(a)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/lib/function_base.py", 
line 527, in asarray_chkfinite
     raise ValueError, "array must not contain infs or 
NaNs"
ValueError: array must not contain infs or NaNs

======================================================================
ERROR: test_hdquantiles 
(numpy.ma.tests.test_morestats.TestQuantiles)
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/tests/test_morestats.py", 
line 97, in test_hdquantiles
     hdq = hdquantiles_sd(data,[0.25, 0.5, 0.75])
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/morestats.py", 
line 168, in hdquantiles_sd
     result = _hdsd_1D(data.compressed(), p)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/morestats.py", 
line 144, in _hdsd_1D
     xsorted = numpy.sort(data.compressed())
AttributeError: 'numpy.ndarray' object has no attribute 
'compressed'

======================================================================
FAIL: Tests the Marits-Jarrett estimator
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/tests/test_morestats.py", 
line 36, in test_mjci
     assert_almost_equal(mjci(data),[55.76819,45.84028,198.8788],5)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/testutils.py", 
line 134, in assert_almost_equal
     return assert_array_almost_equal(actual, desired, 
decimal, err_msg)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/testutils.py", 
line 227, in assert_array_almost_equal
     header='Arrays are not almost equal')
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/testutils.py", 
line 193, in assert_array_compare
     assert cond, msg
AssertionError:
Arrays are not almost equal

(mismatch 33.3333333333%)
  x: array([ 55.76818915, 45.84027529, 198.8787528 ])
  y: array([ 55.76819, 45.84028, 198.8788 ])

======================================================================
FAIL: Test quantiles 1D - w/ mask.
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/tests/test_mstats.py", 
line 61, in test_1d_mask
     [24.833333, 50.0, 75.166666])
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/testutils.py", 
line 134, in assert_almost_equal
     return assert_array_almost_equal(actual, desired, 
decimal, err_msg)
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/testutils.py", 
line 227, in assert_array_almost_equal
     header='Arrays are not almost equal')
   File 
"/usr/local/lib64/python2.5/site-packages/numpy/ma/testutils.py", 
line 193, in assert_array_compare
     assert cond, msg
AssertionError:
Arrays are not almost equal

(mismatch 66.6666666667%)
  x: array([ 24.83333333, 50. , 75.16666667])
  y: array([ 24.833333, 50. , 75.166666])

----------------------------------------------------------------------
Ran 1290 tests in 1.993s

FAILED (failures=2, errors=3)
  


More information about the Numpy-discussion mailing list