I'm looking for something like the inner method in numpy.
I have a 4 dimensional array called 'labels' and a one dimensional array (a vector) called 'discounts'. In numpy I can do numpy.inner(labels, discounts) and this will do the inner product between discounts and each row of the last dimension of labels returning a 3 dimensional array. I can not figure out how to do the same thing with NArray in ruby.