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.

Revisions

  1. mcsmonk created this gist Feb 14, 2020.
    10 changes: 10 additions & 0 deletions savemat7.3.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/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)