pysdic.Transformation.set_parameters#

Transformation.set_parameters(value, *, override_lock=False)[source]#

Set the parameters of the transformation, with an option to override the lock.

The parameters of a transformation are locked when it is owned by another object of the package, to avoid inconsistencies (for example by a pysdic.ReparametrizedTransformation, see locked_message).

Parameters:
  • value (Optional[ArrayLike]) – A 1D array of shape \((n_p,)\) containing the parameters to set for the transformation, or None to unset the parameters. The parameters must be finite (no NaN or inf).

  • override_lock (bool, optional (default: False)) – Whether to override the lock and allow setting parameters even if they are locked.

Raises:
  • ValueError – If the input value is not a 1D array, does not have the correct shape or is not finite.

  • RuntimeError – If the parameters are locked and override_lock is False.

Return type:

None