pysdic.AffineParametrization._encode#

AffineParametrization._encode(p_i, *, dp=False)[source]#

Apply the affine parametrization to input parameters \(\vec{p_i}\).

\[\vec{p_o} = \mathbf{M} \vec{p_i} + \vec{p_0}\]
\[\mathbf{J}_p = \mathbf{M}\]
Parameters:
  • p_i (numpy.ndarray) – A 1D array of shape \((n_i,)\) containing the input parameters to encode.

  • dp (bool, optional (default: False)) – Whether to compute the Jacobian with respect to the input parameters.

Returns:

A tuple containing:

  • The encoded output parameters as a 1D array of shape \((n_o,)\).

  • The Jacobian matrix with respect to the input parameters as a 2D array of shape \((n_o, n_i)\), or None if not computed.

Return type:

Tuple[numpy.ndarray, Optional[numpy.ndarray]]