I try to run the code like below:
>>> import numpy as np >>> A = np.array([[1,2], [3,4], [5,6]]) >>> A.shape (3, 2) >>> B
In wiki
So (3, 2) dot with (2,1) will be (3,1)
How to fix
np.dot(A,B[:,None]) Out[49]: array([[23], [53], [83]])