Multiply scipy sparse matrix with a 3d numpy array
Multiply scipy sparse matrix with a 3d numpy array Question: I have the following matrices a = sp.random(150, 150) x = np.random.normal(0, 1, size=(150, 20)) and I would basically like to implement the following formula I can calculate the inner difference like this diff = (x[:, None, :] – x[None, :, :]) ** 2 diff.shape …