default_dtypes¶
- default_dtypes(*, device: device | None = None) DefaultDataTypes ¶
Returns a dictionary containing default data types.
The dictionary must have the following keys:
"real floating"
: default real floating-point data type."complex floating"
: default complex floating-point data type."integral"
: default integral data type."indexing"
: default array index data type.
Dictionary values must be the corresponding data type object.
- Parameters:
device (Optional[device]) –
device for which to return default data types. If
device
isNone
, the returned data types must be the default data types for the current device; otherwise, the returned data types must be default data types specific to the specified device. Default:None
.Note
Some array libraries have the concept of a device context manager, allowing library consumers to manage the current device context. When
device
isNone
, libraries supporting a device context should return the default data types for the current device. For libraries without a context manager or supporting only a single device, those libraries should return the default data types for the default device.- Returns:
out (DefaultDataTypes) – a dictionary containing the default data type for respective data type kinds.
Notes