set_values#

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

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

Parameters
  • params – Parameters to set the values.

  • values – List-like object that supports indexing.

  • allow_partial – 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.

Returns

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

Raises
  • 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.