[SciPy-Dev] ANN: SciPy 0.9.0 beta 1

Bruce Southey bsouthey@gmail....
Tue Dec 14 15:23:28 CST 2010


On Tue, Dec 14, 2010 at 2:15 PM, Bruce Southey <bsouthey@gmail.com> wrote:
> On 12/14/2010 02:09 PM, Charles R Harris wrote:
>
> On Tue, Dec 14, 2010 at 10:52 AM, Bruce Southey <bsouthey@gmail.com> wrote:
>>
>> On Tue, Dec 14, 2010 at 10:13 AM, Ralf Gommers
>> <ralf.gommers@googlemail.com> wrote:
>> >
>> >
>> > On Wed, Dec 15, 2010 at 12:01 AM, Benjamin Root <ben.root@ou.edu> wrote:
>> >>
>> >>
>> >> On Tue, Dec 14, 2010 at 6:38 AM, Ralf Gommers
>> >> <ralf.gommers@googlemail.com> wrote:
>> >>>
>> >>>
>> >>> On Tue, Dec 14, 2010 at 12:43 AM, Benjamin Root <ben.root@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.
>>
>> On my 64-bit linux system with Python 2.7, the error appears comes
>> from float16 dtype rather than the actual seed
>> >>> np.random.seed(12345678)
>> >>> for T in np.sctypes['float'] + [float]:
>> ...     im1 = pilutil.imresize(im,T(1.1))
>> ...     print T, im.shape, im1.shape
>> ...
>> <type 'numpy.float16'> (10, 20) (10, 21)
>> <type 'numpy.float32'> (10, 20) (11, 22)
>> <type 'numpy.float64'> (10, 20) (11, 22)
>> <type 'numpy.float128'> (10, 20) (11, 22)
>> <type 'float'> (10, 20) (11, 22)
>>
>> Here only the float16 has different shape from the rest.
>>
>
> Ah, you compiled against numpy master instead of numpy 1.5.1, float16 is
> only in the development branch. I think the test should be fixed to use an
> explicit list of types supported by pilutil.
>
> Chuck
>
>
> Sorry,
> I forgot to add the numpy version '2.0.0.dev-799179d' because 1.5.1 is just
> too old and I am too lazy to go back and downgrade :-)
>
>
> Bruce
>

Okay,
No issues with numpy 1.5.1 under Python 2.7 - given below.

I get this error under Python 3.1:' FAIL: test_highpass
(test_fir_filter_design.TestFirWinMore)'.
This appears to be integer division as the test passes when line 126
of  'scipy/signal/tests/test_fir_filter_design.py' is changed to:
assert_array_almost_equal(taps[:ntaps//2], taps[ntaps:ntaps-ntaps//2-1:-1])

Bruce

$ python -c "import scipy; scipy.test()"
Running unit tests for scipy
NumPy version 1.5.1
NumPy is installed in /usr/lib64/python2.7/site-packages/numpy
SciPy version 0.9.0b1
SciPy is installed in /usr/lib64/python2.7/site-packages/scipy
Python version 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1
20100907 (Red Hat 4.5.1-3)]
nose version 0.11.2
[snip]
.........................................................................
----------------------------------------------------------------------
Ran 4794 tests in 41.009s

OK (KNOWNFAIL=12, SKIP=35)


$ python3 -c "import scipy; scipy.test()"
Running unit tests for scipy
NumPy version 1.5.1
NumPy is installed in /usr/lib64/python3.1/site-packages/numpy
SciPy version 0.9.0b1
SciPy is installed in /usr/lib64/python3.1/site-packages/scipy
Python version 3.1.2 (r312:79147, Sep  8 2010, 23:02:57) [GCC 4.5.1
20100812 (Red Hat 4.5.1-1)]
nose version 3.0.0
[snip]

..............................................................................................................................E
======================================================================
ERROR: Failure: ImportError (No module named c_spec)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.1/site-packages/nose/failure.py", line 37, in runTest
    reraise(self.exc_class, self.exc_val, self.tb)
  File "/usr/lib/python3.1/site-packages/nose/_3.py", line 7, in reraise
    raise exc_class(exc_val).with_traceback(tb)
  File "/usr/lib/python3.1/site-packages/nose/loader.py", line 389, in
loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3.1/site-packages/nose/importer.py", line 39,
in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.1/site-packages/nose/importer.py", line 86,
in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.1/site-packages/scipy/weave/__init__.py",
line 13, in <module>
    from .inline_tools import inline
  File "/usr/lib64/python3.1/site-packages/scipy/weave/inline_tools.py",
line 5, in <module>
    from . import ext_tools
  File "/usr/lib64/python3.1/site-packages/scipy/weave/ext_tools.py",
line 7, in <module>
    from . import converters
  File "/usr/lib64/python3.1/site-packages/scipy/weave/converters.py",
line 5, in <module>
    from . import c_spec
  File "/usr/lib64/python3.1/site-packages/scipy/weave/c_spec.py",
line 380, in <module>
    import os, c_spec # yes, I import myself to find out my __file__ location.
ImportError: No module named c_spec

======================================================================
FAIL: test_highpass (test_fir_filter_design.TestFirWinMore)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.1/site-packages/scipy/signal/tests/test_fir_filter_design.py",
line 126, in test_highpass
    assert_array_almost_equal(taps[:ntaps/2], taps[ntaps:ntaps-ntaps/2-1:-1])
  File "/usr/lib64/python3.1/site-packages/numpy/testing/utils.py",
line 774, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File "/usr/lib64/python3.1/site-packages/numpy/testing/utils.py",
line 579, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(shapes (196,), (197,) mismatch)
 x: array([ -2.21482814e-21,   9.49475306e-08,  -8.72925108e-21,
        -1.69672728e-07,  -2.55604897e-21,   2.73170159e-07,
        -9.89221963e-22,  -4.12424017e-07,   4.88221354e-21,...
 y: array([ -2.21482814e-21,   9.49475306e-08,  -8.72925108e-21,
        -1.69672728e-07,  -2.55604897e-21,   2.73170159e-07,
        -9.89221963e-22,  -4.12424017e-07,   4.88221354e-21,...

----------------------------------------------------------------------
Ran 4657 tests in 42.204s

FAILED (KNOWNFAIL=12, SKIP=41, errors=1, failures=1)


More information about the SciPy-Dev mailing list