Calculate the sum of the values of the array.
| Parameters : | input : array_like
labels : array of integers, same shape as input
index : scalar or array
|
|---|---|
| Returns : | output : list
|
See also
Examples
>>> input = [0,1,2,3]
>>> labels = [1,1,2,2]
>>> sum(input, labels, index=[1,2])
[1.0, 5.0]