convert_to_parameter#

zfit.param.convert_to_parameter(value, name=None, prefer_constant=True, params=None, lower=None, upper=None, stepsize=None, *, label=None, dependents=None)[source]#

Convert a numerical to a constant/floating parameter or return if already a parameter. (deprecated arguments)

Deprecated: SOME ARGUMENTS ARE DEPRECATED: (dependents). They will be removed in a future version. Instructions for updating: Use params instead.

Parameters:
  • value (ztyping.NumericalScalarType | ZfitParameter | Callable) – Value of the parameter. If a ZfitParameter is passed, it will be returned as is.

  • name (str | None) – Name of the parameter. If None, a unique name will be created.

  • prefer_constant (bool) – If True, create a ConstantParameter instead of a Parameter, if possible.

  • params (ZfitParameter | Iterable[ZfitParameter] | None) – If the value is a callable, the parameters that are passed to the callable.

  • lower (ztyping.NumericalScalarType | None) – Lower limit of the parameter.

  • upper (ztyping.NumericalScalarType | None) – Upper limit of the parameter.

  • stepsize (ztyping.NumericalScalarType | None) – Step size of the parameter.

  • label (str | None) – |@doc:param.init.label||@docend:param.init.label|

Return type:

ZfitParameter