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

dtype '|u1'? #3

Closed
Fil opened this issue Feb 18, 2020 · 2 comments · Fixed by #4
Closed

dtype '|u1'? #3

Fil opened this issue Feb 18, 2020 · 2 comments · Fixed by #4

Comments

@Fil
Copy link
Contributor

Fil commented Feb 18, 2020

Someone sent me a npy with '|u1', which results in an error. I had to add it in dtypes so that it would parse.

hexdump -C

00000000  93 4e 55 4d 50 59 01 00  76 00 7b 27 64 65 73 63  |.NUMPY..v.{'desc|
00000010  72 27 3a 20 27 7c 75 31  27 2c 20 27 66 6f 72 74  |r': '|u1', 'fort|
00000020  72 61 6e 5f 6f 72 64 65  72 27 3a 20 46 61 6c 73  |ran_order': Fals|
00000030  65 2c 20 27 73 68 61 70  65 27 3a 20 28 34 39 39  |e, 'shape': (499|
00000040  35 30 30 2c 29 2c 20 7d  20 20 20 20 20 20 20 20  |500,), }        |
@j6k4m8
Copy link
Member

j6k4m8 commented Feb 18, 2020

Got it! Won't be able to add this for a while on my end, but if you PR it we can merge (and we'd be very appreciative!)

@Fil Fil mentioned this issue Feb 18, 2020
@Fil
Copy link
Contributor Author

Fil commented Feb 18, 2020

I've sent a PR.

I've also extracted the decoding function so I could use in the browser: https://observablehq.com/@fil/npyjs

@j6k4m8 j6k4m8 closed this as completed in #4 Feb 18, 2020
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.

2 participants