Replace the stateful parameter contract of ParametrizedFunction with pure evaluation:
function(data, parameters): parameter values are merged with the construction-time defaults per call and are never sticky.
with_parameters(): returns a new function with updated defaults (for post-fit plotting, data generation, etc.). The compiled backend function is shared, so this is cheap.
update_parameters() is removed and ParametrizedBackendFunction becomes immutable (frozen).
This makes functions thread-safe and free of hidden side effects: estimators no longer mutate the user's function on every call. Estimator internals switch to the pure call and the documentation notebooks migrate to the new idioms in the same PR.
Replace the stateful parameter contract of
ParametrizedFunctionwith pure evaluation:function(data, parameters): parameter values are merged with the construction-time defaults per call and are never sticky.with_parameters(): returns a new function with updated defaults (for post-fit plotting, data generation, etc.). The compiled backend function is shared, so this is cheap.update_parameters()is removed andParametrizedBackendFunctionbecomes immutable (frozen).This makes functions thread-safe and free of hidden side effects: estimators no longer mutate the user's function on every call. Estimator internals switch to the pure call and the documentation notebooks migrate to the new idioms in the same PR.