sum_intervals
- sherpa.utils.sum_intervals(src, indx0, indx1)[source] [edit on github]
Sum up data within one or more pairs of indexes.
- Parameters:
- Returns:
Notes
It is assumed that all indexes are valid. That is, they are in the range [0, length of src). This condition is not checked for.
Examples
>>> sum_intervals([1.1, 2.2, 3.3, 4.4], 1, 2) 5.5
>>> sum_intervals([1.1, -2.2, 3.3, 4.4], [1, 0], [3, 0]) array([ 5.5, 1.1])