Data Type Functions

Array API specification for data type functions.

A conforming implementation of the array API standard must provide and support the following data type functions.

Objects in API

astype(x, dtype, /, *, copy=True)

Copies an array to a specified data type irrespective of Type Promotion Rules rules.

can_cast(from_, to, /)

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

finfo(type, /)

Machine limits for floating-point data types.

iinfo(type, /)

Machine limits for integer data types.

isdtype(dtype, kind)

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

result_type(*arrays_and_dtypes)

Returns the dtype that results from applying the type promotion rules (see Type Promotion Rules) to the arguments.