Install & Compatibility
Where this runs
tested against v0.2.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✓ 4.5s
105MB installed
● package 105MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
loadmat
✓ from hdf5storage import loadmat
✗ from scipy.io import loadmat
scipy.io.loadmat does not support v7.3 files.
savemat
✓ from hdf5storage import savemat
✗ from scipy.io import savemat
scipy.io.savemat cannot write v7.3 files.
hdf5storage
✓ import hdf5storage
✗ import hdf5storage as h5s
Alias not required but works; correct import is fine.
Write and read a simple dictionary with an array and a string to a MATLAB v7.3 file.
import hdf5storage
import numpy as np
data = {'array': np.array([1,2,3]), 'string': 'hello'}
# Write to v7.3 MAT file
hdf5storage.savemat('example.mat', data, format='7.3')
# Read back
loaded = hdf5storage.loadmat('example.mat')
print(loaded['array'])
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'hdf5storage'
Library not installed
fixRun: pip install hdf5storage
OSError: Unable to open file (file signature not found)
File is not HDF5 or v7.3 format
fixEnsure file is a valid HDF5/v7.3 file. Use h5py or check file header.
ValueError: Cannot write object of type <class 'numpy.ndarray'> with dtype object
savemat cannot handle arrays of Python objects directly
fixConvert object arrays to supported types (e.g., list, string) or use h5py.
TypeError: can't write bytes to HDF5 dataset
Trying to write bytes without encoding
fixConvert bytes to string (e.g., .decode()) or use 'h5py' with vlen bytes data type.
Upgrade
Version history
0.2.2latest on PyPI · released Sep 30, 2025
Audit
Dependencies
No dependency data recorded yet.