mlx icon indicating copy to clipboard operation
mlx copied to clipboard

[Feature Request] Support `numpy.ndarray.view`

Open mochiya98 opened this issue 1 year ago • 0 comments

A perfect implementation is complex, but even just being able to change to another dtype of the same size would make it easier to do bitwise advanced processing in mlx.

np.array(3.14, dtype=np.float32).view(dtype=np.int32)
# array(1078523331, dtype=int32)
# -> 4048f5c3 .. raw

mochiya98 avatar Apr 27 '24 10:04 mochiya98