dpctl.tensor._array_api.Info.dtypes

Info.dtypes(*, device=None, kind=None)[source]

Returns a dictionary of all Array API data types of a specified kind supported by device.

This dictionary only includes data types supported by the Python Array API specification.

Parameters:
  • device (Optional[dpctl.SyclDevice, dpctl.SyclQueue, dpctl.tensor.Device, str]) – array API concept of device used in getting default data types. device can be None (in which case the default device is used), an instance of dpctl.SyclDevice, an instance of dpctl.SyclQueue, a dpctl.tensor.Device object returned by dpctl.tensor.usm_ndarray.device, or a filter selector string. Default: None.

  • kind (Optional[str, Tuple[str, ...]]) –

    data type kind.

    • if kind is None, returns a dictionary of all data types supported by device

    • if kind is a string, returns a dictionary containing the data types belonging to the data type kind specified.

      Supports:

      • "bool"

      • "signed integer"

      • "unsigned integer"

      • "integral"

      • "real floating"

      • "complex floating"

      • "numeric"

    • if kind is a tuple, the tuple represents a union of kind strings, and returns a dictionary containing data types corresponding to the-specified union.

    Default: None.

Returns:

a dictionary of the supported data types of the specified kind

Return type:

dict