[Scipy-tickets] [SciPy] #1356: pilutil tests: explicit supported type list

SciPy Trac scipy-tickets@scipy....
Thu Jan 13 04:26:06 CST 2011


#1356: pilutil tests: explicit supported type list
------------------------+---------------------------------------------------
 Reporter:  rgommers    |       Owner:  somebody   
     Type:  task        |      Status:  new        
 Priority:  normal      |   Milestone:  Unscheduled
Component:  scipy.misc  |     Version:  devel      
 Keywords:  pilutil     |  
------------------------+---------------------------------------------------
 From the ML:
 {{{
 ======================================================================
 >>>> 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
     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.
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1356>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list