0

I need to save a lot of 3-D MATLAB arrays (consisting of stacks of images) of format a x b x N (a = image width, b = image length, N = number of images) to a Python-readable format, so that they can be read to Python as matrices or memmaps.

All the tools I've encountered so far are either for 2-D arrays (such as the MATLAB's function mat2np.m from the File Exchange)or overly clumsy. Is there a neat way to do this?

  • You could save the 3d matrix as .mat file and read it with scipy.io.loadmat. See https://stackoverflow.com/questions/874461/read-mat-files-in-python – user69221 Jan 05 '23 at 15:56

0 Answers0