Closed coreeey closed 1 day ago
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))
Closing because of inactivity
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> data", std::vector<std::complex> data, std::vector data, std::vector data and so on, it didn't work too, the size of my numpy file is (1, 25, 224,224).
here is my code:
npy::LoadArrayFromNumpy("00000_1_video.npy", video.shape, video.fortran_order, video.data);