libnpy
libnpy copied to clipboard
"'std::runtime_error' what(): formatting error: typestrings not matching",
I find i can't load the numpy file due to "terminate called after throwing an instance of "'std::runtime_error' what(): formatting error: typestrings not matching", and i tried "std::vector<std::complex
I convert my numpy file to float and i can copy the d.data, but d.fortran_order is '0', so does it mean that i load the file incorrectly?
This error message could use some improvement.
Do you know what format your original file was in? What does hexdump -C -n 80 <filename>
give you?
fortran_order
indicates if the data is column-major (fortran order = True) oder row-major (fortran order = False), so it being 0 could be perfectly correct in many cases.
This error maybe because your ndarray type doesn't match c++ std::vector 's type.
You can set ndarray type by np.save(f, array.astype(np.float32))