[SciPy-User] NumPy and SciPy test failures
Mads M. Hansen
madsmh at gmail.com
Wed Feb 1 06:56:06 EST 2012
I have built NumPy 1.6.1 and SciPy 0.10.0 for Python 3.2 on a Fedora
16 system and I used gfortran, but when I run the tests I get the
following failures and errors
NumPy:
======================================================================
FAIL: test_kind.TestKind.test_all
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/lib64/python3.2/site-packages/numpy/f2py/tests/test_kind.py",
line 30, in test_all
'selectedrealkind(%s): expected %r but got %r' % (i,
selected_real_kind(i), selectedrealkind(i)))
File "/usr/lib64/python3.2/site-packages/numpy/testing/utils.py",
line 34, in assert_
raise AssertionError(msg)
AssertionError: selectedrealkind(19): expected -1 but got 16
======================================================================
FAIL: test_doctests (test_polynomial.TestDocs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/numpy/lib/tests/test_polynomial.py",
line 84, in test_doctests
return rundocs()
File "/usr/lib64/python3.2/site-packages/numpy/testing/utils.py",
line 988, in rundocs
raise AssertionError("Some doctests failed:\n%s" % "\n".join(msg))
AssertionError: Some doctests failed:
**********************************************************************
File "/usr/lib64/python3.2/site-packages/numpy/lib/tests/test_polynomial.py",
line 32, in test_polynomial
Failed example:
p / q
Expected:
(poly1d([ 0.33333333]), poly1d([ 1.33333333, 2.66666667]))
Got:
(poly1d([ 0.333]), poly1d([ 1.333, 2.667]))
**********************************************************************
File "/usr/lib64/python3.2/site-packages/numpy/lib/tests/test_polynomial.py",
line 54, in test_polynomial
Failed example:
p.integ()
Expected:
poly1d([ 0.33333333, 1. , 3. , 0. ])
Got:
poly1d([ 0.333, 1. , 3. , 0. ])
**********************************************************************
File "/usr/lib64/python3.2/site-packages/numpy/lib/tests/test_polynomial.py",
line 56, in test_polynomial
Failed example:
p.integ(1)
Expected:
poly1d([ 0.33333333, 1. , 3. , 0. ])
Got:
poly1d([ 0.333, 1. , 3. , 0. ])
**********************************************************************
File "/usr/lib64/python3.2/site-packages/numpy/lib/tests/test_polynomial.py",
line 58, in test_polynomial
Failed example:
p.integ(5)
Expected:
poly1d([ 0.00039683, 0.00277778, 0.025 , 0. , 0. ,
0. , 0. , 0. ])
Got:
poly1d([ 0. , 0.003, 0.025, 0. , 0. , 0. , 0. , 0. ])
----------------------------------------------------------------------:
And SciPy:
======================================================================
ERROR: Failure: ImportError (cannot import name _minimize_neldermead)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/failure.py", line 37, in runTest
raise self.exc_class(self.exc_val).with_traceback(self.tb)
File "/usr/lib/python3.2/site-packages/nose/loader.py", line 390, in
loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python3.2/site-packages/nose/importer.py", line 39,
in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python3.2/site-packages/nose/importer.py", line 86,
in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib64/python3.2/site-packages/scipy/optimize/tests/test_anneal.py",
line 10, in <module>
from scipy.optimize import anneal, minimize
File "/usr/lib64/python3.2/site-packages/scipy/optimize/minimize.py",
line 16, in <module>
from .optimize import _minimize_neldermead, _minimize_powell, \
ImportError: cannot import name _minimize_neldermead
======================================================================
ERROR: Failure: ImportError (cannot import name cwt)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/failure.py", line 37, in runTest
raise self.exc_class(self.exc_val).with_traceback(self.tb)
File "/usr/lib/python3.2/site-packages/nose/loader.py", line 390, in
loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python3.2/site-packages/nose/importer.py", line 39,
in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python3.2/site-packages/nose/importer.py", line 86,
in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib64/python3.2/site-packages/scipy/signal/tests/test_peak_finding.py",
line 7, in <module>
from scipy.signal._peak_finding import argrelmax, find_peaks_cwt,
_identify_ridge_lines
File "/usr/lib64/python3.2/site-packages/scipy/signal/_peak_finding.py",
line 7, in <module>
from scipy.signal.wavelets import cwt, ricker
ImportError: cannot import name cwt
======================================================================
ERROR: test_iv_cephes_vs_amos_mass_test (test_basic.TestBessel)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/scipy/special/tests/test_basic.py",
line 1642, in test_iv_cephes_vs_amos_mass_test
c1 = special.iv(v, x)
RuntimeWarning: divide by zero encountered in iv
======================================================================
ERROR: test_continuous_extra.test_cont_extra(<scipy.stats.distributions.loggamma_gen
object at 0x6b38f10>, (0.4141193182605212,), 'loggamma loc, scale
test')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/tests/test_continuous_extra.py",
line 78, in check_loc_scale
m,v = distfn.stats(*arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1632, in stats
mu = self._munp(1.0,*goodargs)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 4120, in _munp
return self._mom0_sc(n,*args)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1166, in _mom0_sc
self.b, args=(m,)+args)[0]
File "/usr/lib64/python3.2/site-packages/scipy/integrate/quadpack.py",
line 247, in quad
retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
File "/usr/lib64/python3.2/site-packages/scipy/integrate/quadpack.py",
line 314, in _quad
return _quadpack._qagie(func,bound,infbounds,args,full_output,epsabs,epsrel,limit)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1163, in _mom_integ0
return x**m * self.pdf(x,*args)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1263, in pdf
place(output,cond,self._pdf(*goodargs) / scale)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 4113, in _pdf
return exp(c*x-exp(x)-gamln(c))
RuntimeWarning: overflow encountered in exp
======================================================================
ERROR: test_continuous_extra.test_cont_extra(<scipy.stats.distributions.lomax_gen
object at 0x74ff610>, (1.8771398388773268,), 'lomax loc, scale test')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/tests/test_continuous_extra.py",
line 78, in check_loc_scale
m,v = distfn.stats(*arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1618, in stats
mu, mu2, g1, g2 = self._stats(*args)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 4644, in _stats
mu, mu2, g1, g2 = pareto.stats(c, loc=-1.0, moments='mvsk')
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1616, in stats
mu, mu2, g1, g2 = self._stats(*args,**{'moments':moments})
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 4595, in _stats
vals = 2*(bt+1.0)*sqrt(b-2.0)/((b-3.0)*sqrt(b))
RuntimeWarning: invalid value encountered in sqrt
======================================================================
ERROR: test_discrete_basic.test_discrete_extra(<scipy.stats.distributions.hypergeom_gen
object at 0x6c9f510>, (30, 12, 6), 'hypergeom entropy nan test')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/tests/test_discrete_basic.py",
line 199, in check_entropy
ent = distfn.entropy(*arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 6315, in entropy
place(output,cond0,self.vecentropy(*goodargs))
File "/usr/lib64/python3.2/site-packages/numpy/lib/function_base.py",
line 1863, in __call__
theout = self.thefunc(*newargs)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 6669, in _entropy
lvals = where(vals==0.0,0.0,log(vals))
RuntimeWarning: divide by zero encountered in log
======================================================================
ERROR: test_discrete_basic.test_discrete_extra(<scipy.stats.distributions.hypergeom_gen
object at 0x6c9f510>, (21, 3, 12), 'hypergeom entropy nan test')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/tests/test_discrete_basic.py",
line 199, in check_entropy
ent = distfn.entropy(*arg)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 6315, in entropy
place(output,cond0,self.vecentropy(*goodargs))
File "/usr/lib64/python3.2/site-packages/numpy/lib/function_base.py",
line 1863, in __call__
theout = self.thefunc(*newargs)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 6669, in _entropy
lvals = where(vals==0.0,0.0,log(vals))
RuntimeWarning: divide by zero encountered in log
======================================================================
ERROR: test_fit (test_distributions.TestFitMethod)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/scipy/stats/tests/test_distributions.py",
line 439, in test_fit
vals2 = distfunc.fit(res, optimizer='powell')
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1875, in fit
vals = optimizer(func,x0,args=(ravel(data),),disp=0)
File "/usr/lib64/python3.2/site-packages/scipy/optimize/optimize.py",
line 1622, in fmin_powell
fval, x, direc1 = _linesearch_powell(func, x, direc1, tol=xtol*100)
File "/usr/lib64/python3.2/site-packages/scipy/optimize/optimize.py",
line 1492, in _linesearch_powell
alpha_min, fret, iter, num = brent(myfunc, full_output=1, tol=tol)
File "/usr/lib64/python3.2/site-packages/scipy/optimize/optimize.py",
line 1313, in brent
brent.optimize()
File "/usr/lib64/python3.2/site-packages/scipy/optimize/optimize.py",
line 1214, in optimize
tmp2 = (x-v)*(fx-fw)
RuntimeWarning: invalid value encountered in double_scalars
======================================================================
ERROR: test_fix_fit (test_distributions.TestFitMethod)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/scipy/stats/tests/test_distributions.py",
line 460, in test_fix_fit
vals2 = distfunc.fit(res,fscale=1)
File "/usr/lib64/python3.2/site-packages/scipy/stats/distributions.py",
line 1875, in fit
vals = optimizer(func,x0,args=(ravel(data),),disp=0)
File "/usr/lib64/python3.2/site-packages/scipy/optimize/optimize.py",
line 302, in fmin
and max(abs(fsim[0]-fsim[1:])) <= ftol):
RuntimeWarning: invalid value encountered in subtract
======================================================================
ERROR: Failure: ImportError (cannot import name common_info)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/failure.py", line 37, in runTest
raise self.exc_class(self.exc_val).with_traceback(self.tb)
File "/usr/lib/python3.2/site-packages/nose/loader.py", line 390, in
loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python3.2/site-packages/nose/importer.py", line 39,
in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python3.2/site-packages/nose/importer.py", line 86,
in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib64/python3.2/site-packages/scipy/weave/__init__.py",
line 26, in <module>
from .inline_tools import inline
File "/usr/lib64/python3.2/site-packages/scipy/weave/inline_tools.py",
line 5, in <module>
from . import ext_tools
File "/usr/lib64/python3.2/site-packages/scipy/weave/ext_tools.py",
line 7, in <module>
from . import converters
File "/usr/lib64/python3.2/site-packages/scipy/weave/converters.py",
line 4, in <module>
from . import common_info
ImportError: cannot import name common_info
======================================================================
FAIL: test_mio.test_mat4_3d
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/lib64/python3.2/site-packages/scipy/io/matlab/tests/test_mio.py",
line 740, in test_mat4_3d
stream, {'a': arr}, True, '4')
File "/usr/lib64/python3.2/site-packages/numpy/testing/utils.py",
line 1008, in assert_raises
return nose.tools.assert_raises(*args,**kwargs)
AssertionError: DeprecationWarning not raised by
functools.partial(<function savemat at 0x9e482f8>, oned_as='row')
======================================================================
FAIL: Regression test for #651: better handling of badly conditioned
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/scipy/signal/tests/test_filter_design.py",
line 34, in test_bad_filter
assert_raises(BadCoefficients, tf2zpk, [1e-15], [1.0, 1.0])
File "/usr/lib64/python3.2/site-packages/numpy/testing/utils.py",
line 1008, in assert_raises
return nose.tools.assert_raises(*args,**kwargs)
AssertionError: BadCoefficients not raised by tf2zpk
----------------------------------------------------------------------
The NumPy errors seem to be mostly rounding errors, but it seems to
round quite aggressively. How siginificant are these errors?
.. Mads
More information about the SciPy-User
mailing list