Einstein Summation Numpy API

This is evaluates the einstein summation on the operands. It is analogous to numpy.einsum, and uses the same notation.

Examples for all the possible use cases are provided below.

omtools.std.einsum.einsum(*operands: List[omtools.core.variable.Variable], subscripts: str, partial_format='dense')

The Einstein Summation function performs the equivalent of numpy.einsum

Parameters
operands: Variable(s)

The Variable(s) which you would like to perform an einsum with.

subscripts: str

Specifies the subscripts for summation as comma separated list of subscript labels

partial_format: str

Denotes whether to compute ‘dense’ partials or ‘sparse’ partials