8000 Closes #12202 (#wimlds); Removed blank lines in doctest example. · CatChenal/scikit-learn@f9352ab · GitHub
[go: up one dir, main page]

Skip to content

Commit f9352ab

Browse files
committed
Closes scikit-learn#12202 (#wimlds); Removed blank lines in doctest example.
1 parent e38bca9 commit f9352ab

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

sklearn/feature_extraction/image.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,16 +340,13 @@ def extract_patches_2d(image, patch_size, max_patches=None, random_state=None):
340340
--------
341341
>>> from sklearn.datasets import load_sample_images
342342
>>> from sklearn.feature_extraction import image
343-
>>>
344343
>>> # Use the array data from the first image in this dataset:
345344
>>> one_image = load_sample_images().images[0]
346345
>>> print('Image shape: {}'.format(one_image.shape))
347346
Image shape: (427, 640, 3)
348-
>>>
349347
>>> patches = image.extract_patches_2d(one_image, (2, 2))
350348
>>> print('Patches shape: {}'.format(patches.shape))
351349
Patches shape: (272214, 2, 2, 3)
352-
>>>
353350
>>> # Here are just two of these patches:
354351
>>> print(patches[1]) # doctest: +NORMALIZE_WHITESPACE
355352
[[[174 201 231]
@@ -467,12 +464,10 @@ class PatchExtractor(BaseEstimator):
467464
--------
468465
>>> from sklearn.datasets import load_sample_images
469466
>>> from sklearn.feature_extraction import image
470-
>>>
471467
>>> # Use the array data from the second image in this dataset:
472468
>>> X = load_sample_images().images[1]
473469
>>> print('Image shape: {}'.format(X.shape))
474470
Image shape: (427, 640, 3)
475-
>>>
476471
>>> pe = image.PatchExtractor(patch_size=(2, 2))
477472
>>> pe_fit = pe.fit(X)
478473
>>> pe_trans = pe.transform(X)

0 commit comments

Comments
 (0)
0