python load mat 并按变量名赋值

import numpy as np
import scipy.io as io


creat = locals()
tmp = io.loadmat("all.mat")
for i in tmp:
    print i
    creat[i] = tmp[i]

 1D-array转置

np.reshape(xx, (-1, 1))

 

你可能感兴趣的:(python load mat 并按变量名赋值)