Skip to content

DOC: Document finfo() result holds a dtype attribute #22330

@honno

Description

@honno

Currently np.finfo() returns an info object with a dtype attribute.

>>> np.finfo(np.float32).dtype
dtype('float32')

The main benefit here looks to be finding the component dtype of complex dtypes.

>>> np.finfo(np.complex64).dtype
dtype('float32')

This however isn't actually documented behaviour (see the numpy.finfo docs), although like complex support in finfo() recently (see #22260) this might not be controversial to document in NumPy? I wasn't sure, hence an issue and not a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions