tensordot

Batch dot product with numpy?

Batch dot product with numpy? Question: I need to get the dot product of many vectors with one vector. Example code: a = np.array([0, 1, 2]) b = np.array([ [0, 1, 2], [4, 5, 6], [-1, 0, 1], [-3, -2, 1] ]) I would like to get the dot product of each row of b …

Total answers: 3