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

Not sure it's a issue or not. How could I parse std::string by using CNPY? #75

Open
shuming1008 opened this issue Jun 19, 2021 · 2 comments

Comments

@shuming1008
Copy link

Hi Guys, thanks for providing such a convenient tool to parse NPZ.

Now I could parse double and uint64_t data from NPZ, but I can not parse numpy.str_ (e.g. std::string?)

Is it possible to parse string by using CNPY?
If it is YES, could you give me a simple example to parse string?

Thanks!

@shuming1008
Copy link
Author

Additional Note:

I tried to parse string by use char. Due to string is various length.
But it seems the read NPY file is incomplete, if parse NPY file with string/char type. I think there must be some issues here.

@Riley16
Copy link

Riley16 commented Sep 27, 2021

Yeah, I also am having difficulties loading in string arrays. The first few bytes read in from an array saved as "<UX" dtype are typically correct but other bytes seem to be overwritten with garbage.

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

No branches or pull requests

2 participants