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))