cupynumeric.astype#

cupynumeric.astype(
x: ndarray,
dtype: DTypeLike,
/,
*,
copy: bool = True,
device: Any | None = None,
) ndarray#

Cast an array to an Array API dtype.

With copy=True (the default), a fresh array is always returned; with copy=False, the input is returned unchanged when its dtype already matches.

Supports only device=None. Complex floating arrays cannot be cast to non-complex dtypes.