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

Fix a mis-parse of NPY v2.0 and 3.0 headers #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nmcclatchey
Copy link

CNPY originally only supported NPY 1.0 headers, with a 2-byte length field. This PR causes parse_npy_header() to respond to NPY 2.0 and 3.0 by reading the header length as 4 bytes.

CNPY originally only supported NPY 1.0 headers, with a 2-byte length
field. This commit causes parse_npy_header to respond to NPY 2.0 and 3.0
by reading the header length as 4 bytes.
@AtomicVar
Copy link

I only saw version 2.0 from NEP 1, can you tell me where is version 3.0 defined? Thanks.

@nmcclatchey
Copy link
Author

You can find all 3 versions defined on numpy.org. Specifically, on the numpy.lib.format page.

Version 3.0 merely swaps ASCII strings to Unicode strings.

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 this pull request may close these issues.

2 participants