Open ExpHP opened 5 years ago
Try the following:
>>> np.save('lol.npy', np.array([1,2,3], dtype=np.dtype('<i1')))
and look at the npy file:
{'descr': '|i1', 'fortran_order': False, 'shape': (3,), }
Numpy always uses | for types where endianness is arbitrary. (these are: |b1, |u1, |i1, and |Sn and |Vn for any n). That makes it impossible to serialize these types from numpy and read them into rust, because the npy crate always expects <.
|
|b1
|u1
|i1
|Sn
|Vn
n
npy
<
Try the following:
and look at the npy file:
Numpy always uses
|
for types where endianness is arbitrary. (these are:|b1
,|u1
,|i1
, and|Sn
and|Vn
for anyn
). That makes it impossible to serialize these types from numpy and read them into rust, because thenpy
crate always expects<
.