From a1565241a42aa949e245b3a966343dd334595fce Mon Sep 17 00:00:00 2001 From: Naoya Kanai Date: Sat, 28 Jul 2018 21:10:01 -0700 Subject: [PATCH] Minor FIX Use tuple indices to access ndarray and avoid numpy FutureWarning (#11701) --- sklearn/feature_extraction/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/feature_extraction/image.py b/sklearn/feature_extraction/image.py index 1fe28d673909c..b6e68537c091c 100644 --- a/sklearn/feature_extraction/image.py +++ b/sklearn/feature_extraction/image.py @@ -286,7 +286,7 @@ def extract_patches(arr, patch_shape=8, extraction_step=1): patch_strides = arr.strides - slices = [slice(None, None, st) for st in extraction_step] + slices = tuple(slice(None, None, st) for st in extraction_step) indexing_strides = arr[slices].strides patch_indices_shape = ((np.array(arr.shape) - np.array(patch_shape)) //