From: Yaroslav Halchenko Date: Wed, 28 Dec 2016 12:24:45 +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^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e6b7fe0587e29d814a5648d7be8a969450411c21;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