Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for | endianness #11

Open
ExpHP opened this issue Jun 2, 2019 · 0 comments · May be fixed by #15
Open

Support for | endianness #11

ExpHP opened this issue Jun 2, 2019 · 0 comments · May be fixed by #15

Comments

@ExpHP
Copy link

ExpHP commented Jun 2, 2019

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 <.

@ExpHP ExpHP linked a pull request Jun 4, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant