Fixed array parameters to reflect new image resizing behavior

This commit is contained in:
wiredfool 2014-12-31 17:17:42 -08:00
parent 4889ae776c
commit ca4ec0cea2

View File

@ -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