## Fast numpy covariance for arrays of different shape

I need to obtain the covariance between an array a of shape (M1, M2, N) and another array b of shape (N,).
What I currently do is use a for block:
import numpy as np
M1, M2, N = 23, 50, 117
a = np.random.uniform(-2., 2., (M1, M2, N))
b = np.random...

more
»