If I have a matrix A and I want to get the dot product of A with every row of B.
import numpy as np
a = np.array([[1.0, 2.0],
[3.0, 4.0]])
b = np.array([[1.0, 1.0],
[2.0, 2.0],
[3.0, 3.0]])
If the goal was to do it manually (or in a loop):
c = np.array([np.dot(a, b[0])])
c = np.append(c, [np.dot(a, b[1])], axis=0)
c = np.append(c, [np.dot(a, b[2])], axis=0)
print(c)
c = [[ 3. 7.]
[ 6. 14.]
[ 9. 21.]]