apply_matrix_to_slices#

apply_matrix_to_slices(target, matrix, slices)[source]#

Apply a matrix to slices of a target tensor.

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

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

  • slices (Sequence[int | slice | ellipsis | Tuple[int | slice | ellipsis, ...]]) – The slices of the target tensor on which to apply the matrix.

Returns:

The tensor resulting from applying the matrix to the slices of the target tensor.

Return type:

ndarray