I have two matrices A,B, and I'd like to create a 3-d array C such that
C[k,i,j]=A[k,j]*B[k,i]
I was thinking about using np.einsum but couldn't find a way and I'm not sure it's useful here.
A naïve loop is possible, but sounds quite inefficient.
UPDATE
C=np.einsum('kj,ki->kij',A,B)
works and is quite elegant, this is on top of @Warren Weckesser 's answer