A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scikit-learn.org/stable/api/../modules/generated/sklearn.datasets.load_sample_images.html below:

load_sample_images — scikit-learn 1.7.0 documentation

load_sample_images#
sklearn.datasets.load_sample_images()[source]#

Load sample images for image manipulation.

Loads both, china and flower.

Read more in the User Guide.

Returns:
dataBunch

Dictionary-like object, with the following attributes.

imageslist of ndarray of shape (427, 640, 3)

The two sample image.

filenameslist

The filenames for the images.

DESCRstr

The full description of the dataset.

Examples

To load the data and visualize the images:

>>> from sklearn.datasets import load_sample_images
>>> dataset = load_sample_images()     
>>> len(dataset.images)                
2
>>> first_img_data = dataset.images[0] 
>>> first_img_data.shape               
(427, 640, 3)
>>> first_img_data.dtype               
dtype('uint8')

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4