2D array vs array of arrays

A 2 dimensional array is by definition an array of arrays. What Dave was saying is that in that context, there are different semantics between the definition of a 2D array like this: this: or this:

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 this new array along particular axes; and then maybe transpose the axes of the new … Read more