pysolvegn.build_batch_affine_parametrization#
- build_batch_affine_parametrization(modes, offset=None)[source]#
Build a
BatchParametrizationbased on an affine transformation (batched counterpart ofbuild_affine_parametrization()).The same transformation is applied to each problem \(k\) of the batch:
\[\mathbf{p}_{out,k} = M \mathbf{p}_{in,k} + \mathbf{p}_0\]with the constant Jacobian \(\mathbf{J}_{P,k} = M\).
- Parameters:
modes (Union[ArrayLike, scipy.sparse.spmatrix]) – The matrix of the affine transformation with shape
(n_p_outputs, n_parameters)(a sparse matrix is converted to a dense array: the batched Jacobians are dense).offset (Optional[ArrayLike], optional) – The offset of the affine transformation with shape
(n_p_outputs,). IfNone, a zero offset is used.
- Returns:
A
BatchParametrizationimplementing the affine transformation:(m, n_parameters) -> (m, n_p_outputs).- Return type: