llohse / libnpy

C++ library for reading and writing of numpy's .npy files
MIT License
361 stars 72 forks source link

I was unable to load the .npy file. #8

Closed srinivas1746 closed 4 years ago

srinivas1746 commented 5 years ago

Error:
terminate called after throwing an instance of 'std::runtime_error' what(): invalid typestring

llohse commented 5 years ago

Hi @srinivas1746, the error indicates that libnpy does not recognize the "typestring" of the .npy file you are trying to read. Do you know what kind of data is contained in the file? As of now, libnpy only supports scalar numeric data types.

Can you open the file in a hex editor and send me the (ASCII)-String that starts at offset 12. Refer to (https://github.com/llohse/libnpy/blob/master/npy.hpp#L318) some information clues about the header structure.

sunshinenum commented 4 years ago

when I use gcc 7.4, it's fixed.

llohse commented 4 years ago

when I use gcc 7.4, it's fixed.

I am closing the issue then.