This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / datasets / _fetchers / face

function

scipy.datasets._fetchers:face

source: build-install/usr/lib/python3.14/site-packages/scipy/datasets/_fetchers.py:183

Signature

def face(gray = False)

Summary

Get a 1024 x 768, color image of a raccoon face.

Extended Summary

The image is derived from https://pixnio.com/fauna-animals/raccoons/raccoon-procyon-lotor

Parameters

gray : bool, optional

If True return 8-bit grey-scale image, otherwise return a color image

Returns

face : ndarray

image of a raccoon face

Notes

Array API Standard Support

face is not in-scope for support of Python Array API Standard compatible backends other than NumPy.

See dev-arrayapi for more information.

Examples

import scipy.datasets
face = scipy.datasets.face()
face.shape
face.max()
✓
np.uint8(255)
import matplotlib.pyplot as plt
plt.gray()
✓
plt.imshow(face)
✗
<matplotlib.image.AxesImage object at 0x7f3f68d6c910>
plt.show()
✓
fig-3aa2aac30caf34cb.png

Aliases

  • scipy.datasets.face

Referenced by