Element-wise multidimension matrix multiplication with broadcasting in python
Is there a efficient (numpy function) way to do element-wise matrix multiplication of two different-sized arrays that will broadcast into a new array. e.g., a = np.arange(24).reshape((2,12)) #gives a 2×12 array b = np.arange(36).reshape((3,12)) #gives a 3×12 array It would then multiply along the dimension with 12 (no summing) to give a final 3-dimensional matrix… Read More Element-wise multidimension matrix multiplication with broadcasting in python