mat2np : turn MATLAB array into a Python Numpy object

版本 1.0.0.0 (2.2 KB) 作者: CY Y
Saves a 1-D or 2-D MATLAB array into pickled Numpy array
2.8K 次下载
更新时间 2022/5/17

Saves 1-D or 2-D MATLAB array into a pickled Numpy array. (Currently only tested in Python 3). Supported datatypes : 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'float64'.
Example usage :

in MATLAB :

a = [ 1.2, 3.5, 4.3 ];
mat2np(a, 'a.pkl', 'float64')

then in Python :

import pickle
with open('a.pkl', 'rb') as fin :
a = pickle.load(fin)

引用格式

CY Y (2025). mat2np : turn MATLAB array into a Python Numpy object (https://github.com/joe-of-all-trades/mat2np), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2016a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Call Python from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.0.0

added support for unsigned integer

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库