1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
From: Yaroslav Halchenko <debian@onerussian.com>
Subject: provide direct size instead of scale since then PIL tries to compare array to a tuple
Last-Update: 2014-10-07
--- a/sklearn/datasets/lfw.py
+++ b/sklearn/datasets/lfw.py
@@ -184,7 +184,7 @@ def _load_imgs(file_paths, slice_, color
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
|