How to multiply a vector by an array/matrix element-wise in numpy?

Viewed 2213

I have a multidimensional array a whose shape is (32,3,5,5) and an array v with a shape of (32,). How could I multiply (i,3,5,5) with (i,) for each i using numpy other than a for-loop?

1 Answers
Related