clone_model#

causalpy.checks.base.clone_model(model)[source]#

Create a fresh, unfitted copy of a model.

PyMC models cannot survive copy.deepcopy (the class identity is lost), so we use their _clone() method instead. For all other model types we fall back to copy.deepcopy.

Parameters:

model (Any)

Return type:

Any