I have two numpy arrays x and y with shapes (m,n,p) and m respectively.
For all indices i between 0 and m-1, I want to multiply every element in the block x[i,:,:] by y[i].
How can I achieve this in a single line?
Related question: How to multiply numpy 1D with N-D array?
>Solution :
A possible solution:
x * y[:, None, None]