einsum

einsum(subscripts: str, *operands: PolyArray | ndarray) Poly | PolyArray[Dim]

Einstein summation for polynomial arrays and NumPy arrays.

Compute the expression defined by subscripts using PolyArray and/or NumPy operands, similar to numpy.einsum.

パラメータ:
  • subscripts (str) -- Subscript notation. For example, 'ij,jk->ik' for matrix multiplication or 'i,i->' for dot product.

  • *operands (PolyArray | ndarray) -- Operands (PolyArray or numpy.ndarray).

戻り値:

Computed result for subscripts.

戻り値の型:

Poly | PolyArray[Dim]

例外:

TypeError -- If no operand is provided or an operand type is invalid.