如何在 Matlab 中读取 .npy 文件 [英] How to read .npy files in Matlab

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

问题描述

我想知道是否可以在Matlab中读取.npy文件?我知道我可以使用Python中的 scipy.io.savemat 将它们转换为Matlab样式的.mat文件;但是我对Matlab中的.npy文件的本机或插件支持更感兴趣.

I was wondering if there is way to read .npy files in Matlab? I know I can convert those to Matlab-style .mat files using scipy.io.savemat in Python; however I'm more interested in a native or plugin support for .npy files in Matlab.

推荐答案

有一个可用的c ++库 https://github.com/rogersce/cnpy

There is a c++ library available https://github.com/rogersce/cnpy

您可以编写一个mex函数来读取数据.我宁愿将所有内容存储在hdf5中

You could write a mex function to read the data. I would prefer to store everything in hdf5

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

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