mat2np : turn MATLAB array into a Python Numpy object

Version 1.0.0.0 (2,2 KB) von CY Y
Saves a 1-D or 2-D MATLAB array into pickled Numpy array
2,7K Downloads
Aktualisiert 17. Mai 2022

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)

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R2016a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

Versionen, die den GitHub-Standardzweig verwenden, können nicht heruntergeladen werden

Version Veröffentlicht Versionshinweise
1.0.0.0

added support for unsigned integer

Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.
Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.