mlx.core.einsum_path

Contents

mlx.core.einsum_path#

einsum_path(subscripts: str, *operands)#

Compute the contraction order for the given Einstein summation.

Parameters:
  • subscripts (str) – The Einstein summation convention equation.

  • *operands (array) – The input arrays.

Returns:

The einsum path and a string containing information about the chosen path.

Return type:

tuple(list(tuple(int, int)), str)