Nitpick: the above `np.sum(np.multiply(...))` seems to be equal to a np.dot