braincell.io.save_morpho

Contents

braincell.io.save_morpho#

braincell.io.save_morpho(morpho, path)[source]#

Write a Morpho to a braincell checkpoint file.

Parameters:
  • morpho (Morphology) – Morphology to serialize. The current default-ordering snapshot is captured; the in-memory tree is not modified.

  • path (str | PathLike) – Destination path. If the path has no suffix, .bcm is appended automatically.

Returns:

The final path the checkpoint was written to.

Return type:

Path

Raises:

TypeError – If morph is not a Morpho instance.

See also

load_morpho

Inverse operation.

save_branch

Persist a single branch.