Module trace

Module trace 

Source
Expand description

Trace-axis reduction (summing axes that appear only in one operand). Trace-axis reduction for einsum operands.

Trace axes are axes that appear in only one operand and not in the output. They must be summed out (reduced) before the main contraction.

Functions§

find_trace_indices
Find indices of trace axes: axes in labels that don’t appear in other or output.
reduce_trace_axes
Reduce all trace axes from a view by summing them out.