• full name: tenpy.tools.hdf5_io.load_from_hdf5

  • parent module: tenpy.tools.hdf5_io

  • type: function

tenpy.tools.hdf5_io.load_from_hdf5(h5group, path=None, ignore_unknown=True)[source]

Load an object from hdf5 file or group.

Roughly equivalent to obj = h5group[path][...], but handle more complicated objects saved as hdf5 groups and/or datasets with save_to_hdf5(). For example, dictionaries are handled recursively. See Saving to disk: input/output for a specification of what can be saved/loaded and what the corresponding datastructure is.

  • h5group (Group) – The HDF5 group (or h5py File) to be loaded.

  • path (None | str | Reference) – Path within h5group to be used for loading. Defaults to the h5group itself specified.

  • ignore_unknown (bool) – Whether to just warn (True) or raise an Error (False) if a class to be loaded is not found.


obj – The Python object loaded from h5group (specified by path).

Return type