Skip to content

Instantly share code, notes, and snippets.

@mcsmonk
Created February 14, 2020 06:52
Show Gist options
  • Select an option

  • Save mcsmonk/769c3a4153148d7450cddf6a5dbbbfe2 to your computer and use it in GitHub Desktop.

Select an option

Save mcsmonk/769c3a4153148d7450cddf6a5dbbbfe2 to your computer and use it in GitHub Desktop.
save mat v7.3 in python
#!/usr/bin/env python
# coding: utf-8
import hdf5storage
import numpy as np
arr = np.array([1,2,3,4,5], dtype=np.double)
matfiledata = dict([('arr', arr)])
hdf5storage.write(matfiledata, '.', 'example.mat', matlab_compatible=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment