[][src]Function arrayfire::sum_by_key

pub fn sum_by_key<KeyType, ValueType>(
    keys: &Array<KeyType>,
    vals: &Array<ValueType>,
    dim: i32
) -> (Array<KeyType>, Array<ValueType::AggregateOutType>) where
    KeyType: ReduceByKeyInput,
    ValueType: HasAfEnum,
    ValueType::AggregateOutType: HasAfEnum

Find sum of all values with similar keys along a given dimension

Parameters

Return Values

Tuple of Arrays, with output keys and values after reduction