mlx
mlx copied to clipboard
[Feature Request] Support `numpy.ndarray.view`
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