ffsim.linalg.apply_matrix_to_slices

ffsim.linalg.apply_matrix_to_slices(target, mat, slices, *, out=None)[source]

Apply a matrix to slices of a target tensor.

Parameters:
  • target (ndarray) – The tensor containing the slices on which to apply the matrix.

  • mat (ndarray) – The matrix to apply to slices of the target tensor.

  • slices – The slices of the target tensor on which to apply the matrix.

Return type:

ndarray

Returns:

The resulting tensor.