I have two matrices X,Y of size (m x d) and (n x d) respectively. Now i want to subtract the whole matrix Y from each element of the matrix X to get a third matrix Z of size (m x n x d). Using loops it would look this:
Z = [(Y-x) for x in X]
but i want to avoid loops and use numpy only.