Skip to content

Commit

Permalink
Minor FIX Use tuple indices to access ndarray and avoid numpy FutureW…
Browse files Browse the repository at this point in the history
…arning (scikit-learn#11701)
  • Loading branch information
naoyak authored and jnothman committed Jul 29, 2018
1 parent 54dc0d7 commit a156524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/feature_extraction/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)) //
Expand Down

0 comments on commit a156524

Please sign in to comment.