Numpy array operation using another indices array
===

I want to do a multidimensional array operation using numpy on three arrays, of which one is an index array, e.g.:

    a = numpy.arange(20).reshape((5, 4))
    # a = [[ 0  1  2  3]  [ 4  5  6  7]  [ 8  9 10 11]  [12 13 14 15]  [16 17 18 19]]
    
    b = numpy.arange(24).reshape(((3, 2, 4)))
    # b = [[[ 0  1  2  3]   [ 4  5  6  7]]   [[ 8  9 10 11]   [12 13 14 15]]  [[16 17 18 19]    [20 21 22 23]]]

    c = numpy.array([0,0,1,1,2])
    # c = [0 0 1 1 2]

now, what I want is:

    d = a * b[&] + b[&&]
where & is the first element of second dimension of **b** (e.g. [ 4  5  6  7]) and && is first element of second dimension (e.g. [ 0  1  2  3]) related to **i**-th item of first dimension of **b**, where **i** is from array **c** (e.g. c[0]=0 for the first element of first dimension of array **b**). **d** has same dimension as **a**.

Thanks
