From d57d0bf1ff8d67f01cb8ea65ce4f3d09377d9c9e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 22 Nov 2016 15:34:29 +0000 Subject: [PATCH] provide direct size instead of scale since then PIL tries to compare array to a tuple Gbp-Pq: Name up_workaround_buggy_pil --- sklearn/datasets/lfw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2