8000 Remove pylab code from docstring and +SKIP those that requie PIL · seckcoder/scikit-learn@dfc7c5c · GitHub
[go: up one dir, main page]

Skip to content

Commit dfc7c5c

Browse files
author
Fabian Pedregosa
committed
Remove pylab code from docstring and +SKIP those that requie 8000 PIL
1 parent a072187 commit dfc7c5c

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

sklearn/datasets/base.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -417,19 +417,15 @@ def load_sample_images():
417417
--------
418418
To load the data and visualize the images::
419419
420-
# >>> from sklearn.datasets import load_sample_images
421-
# >>> dataset = load_sample_images()
422-
# >>> len(dataset.images)
423-
# 2
424-
# >>> first_img_data = dataset.images[0]
425-
# >>> first_img_data.shape
426-
# (427, 640, 3)
427-
# >>> first_img_data.dtype
428-
# dtype('uint8')
429-
# >>> import pylab as pl
430-
# >>> pl.gray()
431-
# >>> pl.matshow(dataset.images[0]) # Visualize the first image
432-
# >>> pl.show()
420+
>>> from sklearn.datasets import load_sample_images
421+
>>> dataset = load_sample_images() #doctest: +SKIP
422+
>>> len(dataset.images) #doctest: +SKIP
423+
2
424+
>>> first_img_data = dataset.images[0] #doctest: +SKIP
425+
>>> first_img_data.shape #doctest: +SKIP
426+
(427, 640, 3)
427+
>>> first_img_data.dtype #doctest: +SKIP
428+
dtype('uint8')
433429
"""
434430
# Try to import imread from scipy. We do this lazily here to prevent
435431
# this module from depending on PIL.

0 commit comments

Comments
 (0)
0