I'm trying to understand, how does 3D NumPy arrat actually do matrix multiplication under with hood (np.matmul (arr1, arr2))
import numpy as np
arr1 = np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]])
arr2 = np.array([[[4, 5, 6], [3, 2, 1]], [[7, 8, 9], [12, 10, 11]]])
print(np.matmul(arr1, arr2))
#this throws an error,
#by going through the error, i find out that, arr1's shape(x,p,n) and arr2's shape #should be(x,n,p)
#that is last dimension of arr1=2nd last dimension of arr2
#but why is that, and what's the actual mathematical operation..
#help me to understand