I am calculating a matrix with numpy/scipy like this:
cost = np.empty([chroma1.data.shape[1], chroma2.data.shape[1]])
for x, cx in enumerate(chroma1.transpose()):
for y, cy in enumerate(chroma2.transpose()):
cost[x, y] = sp.distance.euclidean(cx, cy)
This takes quite an amount of time. Is there any numpy/scipy function that would allow me to get rid of the two nested loops?