I am learning numpy and am a bit confused about broadcasting, here is my set up. I have two matrices
>>> y=np.array([1,2,3])
>>> v = np.array([1,2,3])
>>> r=np.reshape(v, (3, 1))
So r is (3*1) matrix while y is a rank 1 matrix with shape being(3,).
If I do y.dot(r), I get 14, assuming that numpy applies broadcasting on y, making it (1*3) and then it does the dot product with r(3*1) so resulting matrix will be 1*1.
However when I do r.dot(y), it throws an error. Why doesn't it do the same thing here? It should make y(1*3) and r being(3*1), it should give a 3*3 matrix. What is wrong with this reasoning?