Suppose I have three arrays (that is, of type numpy.array):
>>> w.shape
(113,)
>>> X.shape
(113,1)
>>> Y.shape
(113,)
The numpy help pages suggest that on arrays every multiplication is element-wise. Since all above three vectors are of size 113 in the first dimension, I thought multiplication would in all cases give a 113 length vector, but it doesn't:
>>> (w * Y).shape # expected
(113,)
>>> (w * X).shape # ?!?!?!?!
(113,113)
Where does the 113 on the second axis come from? Doesn't look so element-wise to me.