Inspection

Array API specification for namespace inspection utilities.

A conforming implementation of the array API standard must provide and support the following functions and associated inspection APIs.

Objects in API

__array_namespace_info__()

Returns a namespace with Array API namespace inspection utilities.

Inspection APIs

In the namespace (or class) returned by __array_namespace_info__, a conforming implementation of the array API standard must provide and support the following functions (or methods) for programmatically querying data type and device support, capabilities, and other specification-defined implementation-specific behavior, as documented in the functions described below.

capabilities()

Returns a dictionary of array library capabilities.

default_device()

Returns the default device.

default_dtypes(*, device=None)

Returns a dictionary containing default data types.

devices()

Returns a list of supported devices which are available at runtime.

dtypes(*, device=None, kind=None)

Returns a dictionary of supported Array API data types.