edges.io.serialization

A module defining how objects in the edges library should be serialized.

This includes ways to read/write them to HDF5 files.

edges.io.serialization.hickleable(cls: T) T[source]

Render an attrs-defined class recursively hickleable.

edges.io.serialization.load_hdf5(struc, path: str | Path | Group)[source]

Load an HDF5 file as a given type.

edges.io.serialization.ndarray_hook(val: Any, _) ndarray[source]

Structure a numpy array.

edges.io.serialization.ndarray_unstructure_hook(val: ndarray) ndarray[source]

Unstructure a numpy array.

edges.io.serialization.write_object_to_hdf5(obj: Any, path: str | Path | Group)[source]

Write an attrs class to HDF5.