在python中读取v 7.3 mat文件 [英] reading v 7.3 mat file in python

查看:46
本文介绍了在python中读取v 7.3 mat文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下代码读取 matlab 文件

I am trying to read a matlab file with the following code

import scipy.io
mat = scipy.io.loadmat('test.mat')

它给了我以下错误

raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files

所以任何人都可以遇到同样的问题并且可以请任何示例代码

so could anyone please had the same problem and could please any sample code

谢谢

推荐答案

尝试使用 h5py 模块

Try using h5py module

import h5py
with h5py.File('test.mat', 'r') as f:
    f.keys()

这篇关于在python中读取v 7.3 mat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆