I'm using the following code to load Matlab into Python
import h5pyimport numpy as npfilepath = 'file.mat'arrays = {}f = h5py.File(filepath)for k, v in f.items(): arrays[k] = np.array(v)a=arrays['data']a.shapeProblem is that in Matlab
>> size(dataset)ans = 64 50 21 2While in Python
>>> a.shape(2, 21, 50, 64)Any idea why and how to fix this?