change: propagation docs

This commit is contained in:
Benoît Sierro
2023-08-23 09:48:05 +02:00
parent 808ce7dd48
commit 03f5b9c23d

View File

@@ -229,6 +229,30 @@ def propagation(
overwrite: bool = False, overwrite: bool = False,
load_parameters: bool = True, load_parameters: bool = True,
) -> Propagation: ) -> Propagation:
"""
Load or create a new propagation
Parameters
----------
file_or_params : PathLike | Parameters:
path to existing/new propagation. If `Parameters` type, create a in-memory only propagation
params : Parameters | None, optional
if creating a new propagation, parameters must be given either as first or second argument
bundle_data : bool, optional
only used when creating a new simulation
copy all external data referenced by the paramters into the archive, by default False
overwrite : bool, optional
if creating a new propagation, overwrite any existing one, by default False
load_parameters : bool, optional
when loading a propagation, load the parameters automatically (NOTE: this cannot be done
easily after the fact). This is useful if you're laoding a bunch of propagations with
identical parameters. Only load the parameters of one of them and ignore it for the rest.
by default True
Returns
-------
Propagation
"""
file = None file = None
if isinstance(file_or_params, Parameters): if isinstance(file_or_params, Parameters):
params = file_or_params params = file_or_params