Constrained

pmrf.parameters.Constrained(constraint: AbstractConstraint, value: Array | ndarray | bool | number | bool | int | float | complex, *, fixed: bool = False, name: str | None = None, scale: float = 1.0, metadata: Any | None = None) Param

Create a free parameter constrained to a specific domain.

See pmrf.constraints for built-in constraints.

Parameters:
  • constraint (AbstractConstraint) – The constraint to apply to the parameter.

  • value (ArrayLike) – The initial unscaled value of the parameter.

  • fixed (bool, optional) – Initializes the parameter as fixed. Defaults to False.

  • name (str, optional) – A name for the parameter, by default None.

  • scale (float, optional) – The scaling factor to apply, by default 1.0.

  • metadata (Any, optional) – Arbitrary metadata for the parameter, by default None.

Returns:

The constrained parameter.

Return type:

pmrf.Param