pyiron_base.jobs.job.base.recursive_load_from_hdf#
- pyiron_base.jobs.job.base.recursive_load_from_hdf(project_hdf5: ProjectHDFio, item: str)[source]#
Load given item from HDF, but check also for DataContainer along the way.
If item exists as is in HDF, return it, otherwise break it up along every slash and try to load a
DataContainerand then try to index with the remainder of the path, i.e.>>> recursive_load_from_hdf(hdf, 'my/path/to/value')
is equivalent to one of (in this order)
>>> hdf['my/path/to'].to_object()['value'] >>> hdf['my/path'].to_object()['to/value'] >>> hdf['my'].to_object()['path/to/value']
in case
>>> hdf['/my/path/to/value']
doesn’t exist.
- Parameters:
project_hdf5 (ProjectHDFio) – HDF file to access
item (str) – path to value, may contain /
- Returns:
whatever was found in the HDF file None: if nothing was found in the HDF file
- Return type:
object