title: Understanding NumPy's einsum
body: <p>How does <a href="https://numpy.org/doc/stable/reference/generated/numpy.einsum.html" rel="noreferrer"><code>np.einsum</code></a> work?</p>
  <p>Given arrays <code>A</code> and <code>B</code>, their matrix multiplication followed by transpose is computed using <code>(A @ B).T</code>, or equivalently, using:</p>
  <pre><code>np.einsum(&quot;ij, jk -&gt; ki&quot;, A, B)
  </code></pre>