Understanding NumPy’s einsum
(Note: this answer is based on a short blog post about einsum I wrote a while ago.) What does einsum do? Imagine that we have two multi-dimensional arrays, A and B. Now let’s suppose we want to… multiply A with B in a particular way to create new array of products; and then maybe sum … Read more