From: Yaroslav Halchenko Date: Tue, 22 Nov 2016 15:34:29 +0000 (+0000) Subject: provide direct size instead of scale since then PIL tries to compare array to a tuple X-Git-Tag: archive/raspbian/0.18-5+rpi1~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d57d0bf1ff8d67f01cb8ea65ce4f3d09377d9c9e;p=scikit-learn.git.old provide direct size instead of scale since then PIL tries to compare array to a tuple Gbp-Pq: Name up_workaround_buggy_pil --- diff --git a/sklearn/datasets/lfw.py b/sklearn/datasets/lfw.py index a8298cb..21cb907 100644 --- a/sklearn/datasets/lfw.py +++ b/sklearn/datasets/lfw.py @@ -168,7 +168,7 @@ def _load_imgs(file_paths, slice_, color, resize): face = np.asarray(img[slice_], dtype=np.float32) face /= 255.0 # scale uint8 coded colors to the [0.0, 1.0] floats if resize is not None: - face = imresize(face, resize) + face = imresize(face, (h, w)) if not color: # average the color channels to compute a gray levels # representation