Einstein Summation New 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_new_api.einsum_new_api(*operands: List[omtools.core.variable.Variable], operation: List[tuple], partial_format='dense')¶
The Einstein Summation function performs the equivalent of numpy.einsum using a new api
- Parameters
- operands: Variables(s)
The Variable(s) which you would like to perform an einsum with.
- subscripts: list[tuple]
Specifies the subscripts for summation as a list of tuples
- partial_format: str
Denotes whether to compute ‘dense’ partials or ‘sparse’ partials