pythonmatlabnumpyscipyformat-conversion

How to read .npy files in Matlab


I was wondering if there is way to read .npy files in Matlab? I know I can convert those to Matlab-style .mat files using scipy.io.savemat in Python; however I'm more interested in a native or plugin support for .npy files in Matlab.


Solution

  • There is a c++ library available https://github.com/rogersce/cnpy

    You could write a mex function to read the data. I would prefer to store everything in hdf5