braincell.io.save_branch

Contents

braincell.io.save_branch#

braincell.io.save_branch(branch, path)[source]#

Write a Branch to a braincell checkpoint file.

Parameters:
  • branch (Branch) – Branch instance to serialize.

  • 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 branch is not a Branch instance.

See also

load_branch

Inverse operation.

save_morpho

Persist a whole morphology tree.