kaleidocell.save#
- kaleidocell.save(obj, path)[source]#
Save a kaleidocell result object to disk.
Serialises obj with pickle and gzip compression. The file can be reloaded with
load().- Parameters:
obj – Any kaleidocell result object — the output of
multi_sample_nmf()(results_nmf),derive_nmf_metaprograms()(results_mp), or any other Python object you want to persist.path (str or Path) – Destination file path. The
.kcextension is appended automatically if not already present.
- Returns:
The resolved path of the saved file.
- Return type:
Path
Examples
>>> kaleidocell.save(results_mp, "results/my_run") PosixPath('results/my_run.kc') >>> results_mp = kaleidocell.load("results/my_run.kc")