I have 2 vectors containing matrices, say x = [A, B, C, ..]
and y = [D, E, F, ..]
.
How can I calculate the product z = [A*D, B*E, C*F, ..]
the most performant way using numpy?
Both x
and y
contain the same number of matrices and all matrices have the same shape, e.g both x
and y
could have the shape (1000,3,3)
. The result of the calculation should therefore also result in the same shape of (1000,3,3)
.
Edit: For clarification, A*B should denote the dot product of A and B.