I have a problem to understand the matrix multiplication in numpy.
For example I have the following matrix (2d numpy array):
a = [ [ 1. 1. ]
[ 1. 2. ]
[ 1. 3. ] ]
theta = [ 1. 1. ]
result = [ [ 2. ]
[ 3. ]
[ 4. ] ]
result = np.dot(a,theta)
result = [ 2. 3. 4. ]
No, you're multiplying numpy array with another numpy array (not a matrix with a vector), although it looks like that. This is because, in essence, numpy arrays are not the same as matrices. And the dot product treats it that way as well.
If you write out the array and multiply, then you will see why. It's just the dot product (element-wise multiplication) of each row in the array
'a' with the vector
PS: (matrices are 2-D while arrays are not limited to any dimension)