xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

how do I load numpy array of string using load_npy?

Open p1m3nt opened this issue 3 years ago • 2 comments

I have a numpy array with dtype of '|S19' and I tried to use load_npystd::string to load it but failed. Is it possible to do it with xtensor?

p1m3nt avatar May 19 '22 04:05 p1m3nt

What error do you have?

JohanMabille avatar May 19 '22 09:05 JohanMabille

error: Unhandled exception at 0x00007FFBF1813B29 in my_app.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000EFFF6F9948. occurred throwed by inline void parse_typestring(std::string typestring) in xnpy.hpp, the "invalid typestring" exception I use numpy.save to save a string array (with dtype of either '|S19' or '<U19') converted from a list of strings and tried to load it with xt::load_npystd::string

p1m3nt avatar May 19 '22 12:05 p1m3nt