[SciPy-User] scipy 0.9.0.dev6984 test failures

Ralf Gommers ralf.gommers at googlemail.com
Sun Dec 5 10:15:47 EST 2010


On Fri, Dec 3, 2010 at 4:09 PM, Nils Wagner <nwagner at iam.uni-stuttgart.de>wrote:

>
> ======================================================================
> FAIL: line-search Newton conjugate gradient optimization
> routine
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/optimize/tests/test_optimize.py",
> line 177, in test_ncg
>     assert_(self.gradcalls == 18, self.gradcalls) # 0.8.0
>   File
>
> "/data/home/nwagner/local/lib/python2.5/site-packages/numpy/testing/utils.py",
> line 34, in assert_
>     raise AssertionError(msg)
> AssertionError: 16
>

This number of calls has been changing before apparently, and now has
differences between platforms or python versions. For 0.8.0 it had an issue
on Windows due to == comparison with floating point numbers.

Since converging faster is not exactly a bug, can we just change the
comparison to <= ?


>
> ======================================================================
> FAIL: test_basic (test_signaltools.TestMedFilt)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/signal/tests/test_signaltools.py",
> line 284, in test_basic
>     [ 0,  7, 11,  7,  4,  4, 19, 19, 24,  0]])
>   File
>
> "/data/home/nwagner/local/lib/python2.5/site-packages/numpy/testing/utils.py",
> line 686, in assert_array_equal
>     verbose=verbose, header='Arrays are not equal')
>   File
>
> "/data/home/nwagner/local/lib/python2.5/site-packages/numpy/testing/utils.py",
> line 618, in assert_array_compare
>     raise AssertionError(msg)
> AssertionError:
> Arrays are not equal
>
> (mismatch 8.0%)
>  x: array([[  0.,  50.,  50.,  50.,  42.,  15.,  15.,
>  18.,  27.,   0.],
>        [  0.,  50.,  50.,  50.,  50.,  42.,  19.,  21.,
>  29.,   0.],
>        [ 50.,  50.,  50.,  50.,  50.,  47.,  34.,  34.,
>  46.,  35.],...
>  y: array([[ 0, 50, 50, 50, 42, 15, 15, 18, 27,  0],
>        [ 0, 50, 50, 50, 50, 42, 19, 21, 29,  0],
>        [50, 50, 50, 50, 50, 47, 34, 34, 46, 35],...
>

If you change the assert_array_equal calls in TestMedfilt to
assert_array_almost_equal does the test pass?

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20101205/3cae13b3/attachment.html>


More information about the SciPy-User mailing list