I think yesterday I asked the wrong question . I really want to mutiply two matrices 2x2xN A and B , so that
C[:,:,i] = dot(A[:,:,i], B[:,:,i])
For example, if I have a matrix
A = np.arange(12).reshape(2, 2, 3)
How can I get C = A x A with the definition described above? Is there a built-in function for this?
Also, if I multiply A (shape 2x2xN) by B (shape 2x2x1, instead of N) , I want to get
C[:,:,i] = dot(A[:,:,i], B[:,:,1])
source share