Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing test "test_imresize4 (test_pilutil.TestPILUtil)" of scipy1.4.1 with pillow2.7.0 (on windows) #1074

Closed
stonebig opened this issue Jan 10, 2015 · 5 comments

Comments

@stonebig
Copy link

with latest @cgohlke wheelaries for pillow2.7.0 and scipy0.14.1, I have still the issue on windows 64bit python3.4.2 (and also 32bit).... when trying to check if my installation is ok

import scipy;scipy.test()
======================================================================
FAIL: test_imresize4 (test_pilutil.TestPILUtil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\result_tests\WinPython-64bit-3.4.2.4_build5FlavorRfull\python-3.4.2.amd64\lib\site-packages\numpy\testing\decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "D:\result_tests\WinPython-64bit-3.4.2.4_build5FlavorRfull\python-3.4.2.amd64\lib\site-packages\scipy\misc\tests\test_pilutil.py", line 57, in test_imresize4
    assert_equal(im2, res)
  File "D:\result_tests\WinPython-64bit-3.4.2.4_build5FlavorRfull\python-3.4.2.amd64\lib\site-packages\numpy\testing\utils.py", line 275, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "D:\result_tests\WinPython-64bit-3.4.2.4_build5FlavorRfull\python-3.4.2.amd64\lib\site-packages\numpy\testing\utils.py", line 739, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "D:\result_tests\WinPython-64bit-3.4.2.4_build5FlavorRfull\python-3.4.2.amd64\lib\site-packages\numpy\testing\utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 75.0%)
 x: array([[ 1.  ,  1.25,  1.75,  2.  ],
       [ 1.5 ,  1.75,  2.25,  2.5 ],
       [ 2.5 ,  2.75,  3.25,  3.5 ],
       [ 3.  ,  3.25,  3.75,  4.  ]], dtype=float32)
 y: array([[ 1. ,  1. ,  1.5,  2. ],
       [ 1. ,  1. ,  1.5,  2. ],
       [ 2. ,  2. ,  2.5,  3. ],
       [ 3. ,  3. ,  3.5,  4. ]], dtype=float32)
@homm
Copy link
Member

homm commented Jan 10, 2015

This is obviously very bad scipy developers idea to test third-party functionality in it's own unit tests. This is wrong result of bilinear interpolation produced by previous Pillow and PIL version. This is definitely scipy issue, not Pillow.

@wiredfool
Copy link
Member

I ran across this @ release time and meant to get a PR to scipy.

This test has exposed regressions before, so we actually have a copy of it in our tree as well. The comments on the test say that they're testing for the same return value for various different ways of specifying the resize size target. They're just testing against a hardwired (and wrong) array rather than just making sure that Pillow is doing the same thing for different inputs at their end.

@wiredfool
Copy link
Member

Ok PR sent.

@stonebig
Copy link
Author

thanks !

@wiredfool
Copy link
Member

It's been merged in Scipy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants