The trace function#

Aliases#

halerium.core.trace
halerium.core.math.trace
trace(operand, offset=0, axis1=0, axis2=1)#

Trace, i.e the sums along specified diagonals.

Parameters:
  • operand – The input of which to compute the trace.

  • offset (int) – Offset of the diagonal from the main diagonal.

  • axis1 (int) – First axis of the two-dimensional sub-array from which the diagonal is taken.

  • axis2 (int) – Second axis of the two-dimensional sub-array from which the diagonal is taken.

Returns:

operator – The halerium Operator representing the operation.

Return type:

halerium.core.operator.Trace