popsynth.utils.hdf5_utils module

popsynth.utils.hdf5_utils.recursively_save_dict_contents_to_group(h5file, path, dic: Dict[Any, Any])[source]

Save dict to HDF5.

Parameters
  • h5file – HDF5 file

  • path – Path inside file

  • dic (Dict[Any, Any]) – Dictionary to save

popsynth.utils.hdf5_utils.recursively_load_dict_contents_from_group(h5file, path)[source]

Load files from hdf5.

Parameters
  • h5file – HDF5 file

  • path – Path in file

Returns

A dictionary

Return type

Dict[Any, Any]

popsynth.utils.hdf5_utils.fill_graph_dict(graph_dict, fill_value=1)[source]

Fill a networkx graph dict so that it can be stored in an HDF5 file.

popsynth.utils.hdf5_utils.clean_graph_dict(graph_dict)[source]

Clean networkx graph dict so that it can be stored in an HDF5 file.