• Parse an equation for einsum.

    Parameters

    • equation: string

      The einsum equation (e.g., "ij,jk->ik").

    • numTensors: number

      Number of tensors provided along with equation. Used to check matching number of input tensors.

    Returns {
        allDims: string[];
        idDims: number[][];
        summedDims: number[];
    }

    An object consisting of the following fields:

    • allDims: all dimension names as strings.
    • summedDims: a list of all dimensions being summed over, as indices to the elements of allDims.
    • idDims: indices of the dimensions in each input tensor, as indices to the elements of `allDims.
    • allDims: string[]
    • idDims: number[][]
    • summedDims: number[]

Generated using TypeDoc