loupe.tensordot#

class loupe.tensordot(a, b, axes=2)[source]#

Compute tensor dot product along specified axes.

Parameters:
  • a (array_like) – Tensors to dot.

  • b (array_like) – Tensors to dot.

  • axes (int or (2,) array_like, optional) –

    • If an int N, sum over the last N axes of a and the first N axes of b in order. The sizes of the corresponding axes must match.

    • If array_like, sum over the corresponding axes of a in the first entry and the corresponding axes of b in the second entry. Both elements in axes must have the same length.

Returns:

out – The tensor dot product of the input.

Return type:

Function

See also

einsum