<div dir="ltr">Hello, <div><br></div><div>Recently, I came across the index utility &quot;number_equal_indices&lt;&gt;&quot; method, which is used in the implementation of tensor contraction. If my understanding is correct, this appears to facilitate the implementation of Einstein summations, where common indices between two tensors/matrices are summed. </div><div><br></div><div>My question now is - what happens when there are more than one equal index (i.e. both tensors use indices i and j)?</div><div><br></div><div>Thanks,</div><div><br></div><div>Thomas Yang </div></div>