Skip to main content

mlx_array_new_data

Function mlx_array_new_data 

Source
pub unsafe extern "C" fn mlx_array_new_data(
    data: *const c_void,
    shape: *const c_int,
    dim: c_int,
    dtype: mlx_dtype,
) -> mlx_array
Expand description

New array from existing buffer. @param data A buffer which will be copied. @param shape Shape of the array. @param dim Number of dimensions (size of shape). @param dtype Type of array elements.