deepmr.io.write_hdf5

Contents

deepmr.io.write_hdf5#

deepmr.io.write_hdf5(input, filepath)[source]#

Write a given dictionary to HDF5 file.

Parameters:
  • input (dict) – Input dictionary.

  • filepath (str) – Path to file on disk.

Example

Define an exemplary dictionary:

>>> import numpy as np
>>> pydict = {'headerstr': 'someinfo', 'testdouble': np.ones(3, dtype=np.float32)}

Save the dictionary to disk:

>>> import os
>>> import deepmr.io
>>> filepath = os.path.realpath('.')
>>> deepmr.io.write_hdf5(filepath)