llohse / libnpy

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

Exposing fortran_order in LoadArrayFromNumpy #10

Closed ziembla closed 4 years ago

ziembla commented 4 years ago

I've exposed "fortran_order" in LoadArrayFromNumpy because (as shown in added examples created by createnpy.py) transposing the matrix in numpy only changes that attribute by default and the layout of the matrix data after the header stays the same as without trasposition. Having fortran_order is therefore crucial for interpreting the data. Not wanting to break the interface I added overloaded function. Also silenced a casting warning.

llohse commented 4 years ago

Thanks a lot.