diff --git a/Tests/test_scipy.py b/Tests/test_scipy.py index e3d1d97cd..926bbb186 100644 --- a/Tests/test_scipy.py +++ b/Tests/test_scipy.py @@ -11,7 +11,10 @@ except: class Test_scipy_resize(PillowTestCase): - """ Tests for scipy regression in 2.6.0 """ + """ Tests for scipy regression in 2.6.0 + + Tests from https://github.com/scipy/scipy/blob/master/scipy/misc/pilutil.py + """ def setUp(self): if not HAS_SCIPY: @@ -27,10 +30,10 @@ class Test_scipy_resize(PillowTestCase): def test_imresize4(self): im = np.array([[1,2], [3,4]]) - res = np.array([[ 1. , 1. , 1.5, 2. ], - [ 1. , 1. , 1.5, 2. ], - [ 2. , 2. , 2.5, 3. ], - [ 3. , 3. , 3.5, 4. ]], dtype=np.float32) + res = np.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=np.float32) # Check that resizing by target size, float and int are the same im2 = misc.imresize(im, (4,4), mode='F') # output size im3 = misc.imresize(im, 2., mode='F') # fraction