## Using numpy.einsum for transpose times matrix: x^T * x

For a 2D matrix X (shape (m,n)), I'm trying to calculate X.T * X where * is matrix multiplication. Following the explanation on this post I expected to be able to do this using, np.einsum('ji,ik->jk', X, X) where on the LHS writing ji first takes...

more
»