from numpy.core.records import fromarrays
from scipy.io import savemat
myrec = fromarrays([[1, 10], [2, 20]], names=['field1', 'field2'])
savemat('p.mat', {'myrec': myrec})
How can I create a Matlab struct array from scipy.io?