File tree 1 file changed +9
-13
lines changed
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -417,19 +417,15 @@ def load_sample_images():
417
417
--------
418
418
To load the data and visualize the images::
419
419
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')
433
429
"""
434
430
# Try to import imread from scipy. We do this lazily here to prevent
435
431
# this module from depending on PIL.
You can’t perform that action at this time.
0 commit comments