Data type functions

The package dpctl.tensor contains the following data type functions conforming to Python Array API specification:

astype(array, new_dtype[, order, casting, ...])

Returns a copy of the dpctl.tensor.usm_ndarray, cast to a specified type.

can_cast(from, to[, casting])

Determines if one data type can be cast to another data type according to Type Promotion Rules.


Returns machine limits for floating-point data types.


Returns machine limits for integer data types.

isdtype(dtype, kind)

Returns a boolean indicating whether a provided dtype is of a specified data type kind.


Returns the dtype that results from applying the Type Promotion Rules to the arguments.