From e6b7fe0587e29d814a5648d7be8a969450411c21 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 28 Dec 2016 12:24:45 +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