mbi.save

mbi.save(obj: Any, file: str | PathLike | IOBase) → None[source]

Save a JAX pytree to .npz format.

The pytree leaves (arrays) are stored as named entries and the tree structure (including all static / auxiliary data) is stored as a pickled PyTreeDef.

Common pytrees include CliqueVector, MarkovRandomField, and list[LinearMeasurement], but any JAX-compatible pytree is accepted.

Parameters:
  • obj – An arbitrary JAX pytree.

  • file – Path string or writable binary file-like object.