zfit.param.set_values(params, values, allow_partial=None)[source]

Set the values (using a context manager or not) of multiple parameters.

  • params (Union[Parameter, Iterable[Parameter]]) – Parameters to set the values.

  • values (Union[int, float, complex, Tensor, ForwardRef, Iterable[Union[int, float, complex, Tensor, ForwardRef]], ZfitResult]) – List-like object that supports indexing.

  • allow_partial (Optional[bool]) – Allow to set only parts of the parameters in case values is a ZfitResult and not all are present in the values. If False, params not in values will raise an error. Note that setting this to true will also go with an empty values container.


An object for a context manager (but can also be used without), can be ignored.

  • ValueError – If the value is not between the limits of the parameter.

  • ValueError – If not all params are in values if values is a FitResult and allow_partial is False.