save (pmrf.save)

save(target, tree)[source]

Save a ParamRF Model (or any Parax PyTree) to a file.

Automatically appends the ‘.prf’ (ParamRF) extension to the target path if no file extension is provided. This enforces the ParamRF file convention while delegating the underlying serialization to Parax.

Parameters:
  • target (str, PathLike, or BinaryIO) – The path to the saved file or an open file-like object.

  • tree (Any) – The PyTree containing the ParamRF model to save.