Open minghuaw opened 5 months ago
as_slice
here is closer to asData
in the swift binding than asArray
.
Similar to the situation with performing implicit conversion for as_slice
, a new continuous copy is created implicitly in the swift binding. This makes the lifetime of the newly created underlying buffer rather complicated, and maybe the equivalent of asArray
in the swift binding should not be implemented.
TODO:
as_slice
is not equivalent to asArray
see ml-explore/mlx-swift#96