【发布时间】:2018-12-18 05:08:52
【问题描述】:
我正在寻找与此 python 3.6 代码等效的代码:
import scipy.io as sio
file = sio.loadmat('file.mat')
data = file['data']
我必须在 python 2.7 中做同样的事情,我试过了
import h5py
f = h5py.File('file.mat')
但它不起作用,你有什么想法吗?
谢谢
【问题讨论】:
-
为什么不使用 SciPy 方法? SciPy 支持 Python 2.7。
标签: python python-2.7 mat-file