[SciPy-Dev] ANN: SciPy 0.9.0 beta 1

Ralf Gommers ralf.gommers at googlemail.com
Tue Dec 14 11:13:52 EST 2010


On Wed, Dec 15, 2010 at 12:01 AM, Benjamin Root <ben.root at ou.edu> wrote:

>
>
> On Tue, Dec 14, 2010 at 6:38 AM, Ralf Gommers <ralf.gommers at googlemail.com
> > wrote:
>
>>
>>
>> On Tue, Dec 14, 2010 at 12:43 AM, Benjamin Root <ben.root at ou.edu> wrote:
>>
>> Hi Ben,
>>
>>>
>>> Just did a clean rebuild (after a clean rebuild of numpy) and had two
>>> errors in the tests:
>>>
>>
>> What platform are you on?
>>
>
> I reran the tests on just this scipy.misc module, here is the output:
>
> >>> scipy.misc.test()
> Running unit tests for scipy.misc
> NumPy version 2.0.0.dev-799179d
> NumPy is installed in /home/bvr/Programs/numpy/numpy
> SciPy version 0.10.0.dev
> SciPy is installed in /home/bvr/Programs/scipy/scipy
> Python version 2.6.4 (r264:75706, Jun  4 2010, 18:20:16) [GCC 4.4.4
> 20100503 (Red Hat 4.4.4-2)]
> nose version 0.11.3
> ...........F.....
>
> ======================================================================
> FAIL: test_imresize (test_pilutil.TestPILUtil)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/bvr/Programs/numpy/numpy/testing/decorators.py", line 146, in
> skipper_func
>     return f(*args, **kwargs)
>   File "/home/bvr/Programs/scipy/scipy/misc/tests/test_pilutil.py", line
> 28, in test_imresize
>
>     assert_equal(im1.shape,(11,22))
>   File "/home/bvr/Programs/numpy/numpy/testing/utils.py", line 251, in
> assert_equal
>     assert_equal(actual[k], desired[k], 'item=%r\n%s' % (k,err_msg),
> verbose)
>   File "/home/bvr/Programs/numpy/numpy/testing/utils.py", line 313, in
> assert_equal
>     raise AssertionError(msg)
> AssertionError:
> Items are not equal:
> item=0
>
>  ACTUAL: 10
>  DESIRED: 11
>
> ----------------------------------------------------------------------
> Ran 17 tests in 0.089s
>
> FAILED (failures=1)
> <nose.result.TextTestResult run=17 errors=0 failures=1>
>
> Note, that I am still getting this error with the suggested addition of
> "np.random.seed(12345678)" to scipy/misc/tests/test_pilutil.py.  I tried it
> both at line 20 (before the call to class TestPILUtil) and at line 24
> (before the call to np.random.random() in test_imresize.  I do not see how
> setting the seed value for these tests would make any difference since they
> are merely testing the resulting shape of the image after a resize, not the
> values of the resized image itself.
>

The seeding may not matter (I haven't actually looked in detail yet), but I
thought I had seen this error pop up before, but not reproducibly. The
imresize function does some interpolation, so the numerical values could
matter. In that case seeding would help.

>
>
>>
>>> ======================================================================
>>> FAIL: test_imresize (test_pilutil.TestPILUtil)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>>   File "/home/bvr/Programs/numpy/numpy/testing/decorators.py", line 146,
>>> in skipper_func
>>>     return f(*args, **kwargs)
>>>   File "/home/bvr/Programs/scipy/scipy/misc/tests/test_pilutil.py", line
>>> 25, in test_imresize
>>>     assert_equal(im1.shape,(11,22))
>>>   File "/home/bvr/Programs/numpy/numpy/testing/utils.py", line 251, in
>>> assert_equal
>>>     assert_equal(actual[k], desired[k], 'item=%r\n%s' % (k,err_msg),
>>> verbose)
>>>   File "/home/bvr/Programs/numpy/numpy/testing/utils.py", line 313, in
>>> assert_equal
>>>     raise AssertionError(msg)
>>> AssertionError:
>>> Items are not equal:
>>> item=0
>>>
>>>  ACTUAL: 10
>>>  DESIRED: 11
>>>
>>
>> This test should be changed to use a fixed seed (add as a first line of
>> the test "np.random.seed(12345678)"). Can you provide one that fails?
>>
>>
>
> Also, I am not sure what you mean by "Can you provide one that fails?".
>

I meant a seed value that fails. This one does, that's all we need.

>
>
>>
>>> ======================================================================
>>> FAIL: test_basic (test_signaltools.TestMedFilt)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>>   File "/home/bvr/Programs/scipy/scipy/signal/tests/test_signaltools.py",
>>> line 284, in test_basic
>>>     [ 0,  7, 11,  7,  4,  4, 19, 19, 24,  0]])
>>>   File "/home/bvr/Programs/numpy/numpy/testing/utils.py", line 686, in
>>> assert_array_equal
>>>     verbose=verbose, header='Arrays are not equal')
>>>   File "/home/bvr/Programs/numpy/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],...
>>>
>>> ----------------------------------------------------------------------
>>> Ran 4822 tests in 199.244s
>>>
>>> FAILED (KNOWNFAIL=12, SKIP=35, failures=2)
>>> <nose.result.TextTestResult run=4822 errors=0 failures=2>
>>>
>>>
> Oddly enough, this second error does not always repeat itself (I had one
> run of the test where it did not happen...).  Also, something interesting
> occurred while trying to get more verbose output from scipy.signal.test.
> When I ran it for the second time in a python session, a regression error
> pops up, but this never happens in the first run of the test.
>

That's just because warnings like that are only raised once from the same
module. So the second time the check fails. Nothing to worry about.

Cheers,
Ralf


>
> ======================================================================
> FAIL: Regression test for #651: better handling of badly conditioned
>
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/bvr/Programs/scipy/scipy/signal/tests/test_filter_design.py",
> line 32, in test_bad_filter
>     assert_raises(BadCoefficients, tf2zpk, [1e-15], [1.0, 1.0])
>   File "/home/bvr/Programs/numpy/numpy/testing/utils.py", line 982, in
> assert_raises
>     return nose.tools.assert_raises(*args,**kwargs)
> AssertionError: BadCoefficients not raised
>
> I hope this is helpful.  Let me know what other information I can provide.
>
> Ben Root
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20101215/5e552768/attachment.html>


More information about the SciPy-Dev mailing list