jangada.serialization.Persistable.__enter__#

Persistable.__enter__() Persistable#

Enter context manager mode.

Opens the HDF5 file and loads data with ProxyDataset wrappers for array properties, enabling lazy loading.

Returns:
Persistable

Self, with properties loaded (arrays as ProxyDataset).

Notes

The file remains open until __exit__ is called. All array properties become ProxyDataset instances, allowing efficient access to large datasets without loading them fully into memory.

Examples

>>> with Experiment('data.hdf5', mode='r') as exp:
...     # File is open, exp.data is ProxyDataset
...     chunk = exp.data[100:200]