I am looking for an efficient way to perform a matrix multiplication (dot product) of two time-dependent 2D matrices to end up with one time-dependent 2D matrix.
For example:
a = np.zeros([7200,13,4])
b = np.zeros([7200,4,7])
And I want to end up with
c = np.zeros([7200,13,7])
I already found np.tensordot, however this yields me a 4D matrix instead of a 3D matrix. Also other numpy functions did not yield me the required shape. So I wonder if there is any way to perform this matrix multiplication without the use of for-loops?
Best regards,
Timothy Van Daele
a = np.zeros([7200,13,4])+1b = np.zeros([7200,4,7])+1c = np.einsum('ijk,ikl->ijl',a,b)c.shape(7200, 13, 7)Best regards, Timothy Van Daele - TimothyVD