MLXBackend.astype#

static MLXBackend.astype(arr, dtype)#

Change the datatype of arr.

Parameters:
arrBackendArray

Input data.

dtypetype

Target data type.

Returns:
BackendArray

Freshly allocated array containing the data of arr in dtype.