pyflwdir.regions.region_sum#
- pyflwdir.regions.region_sum(data, regions)[source]#
Returns the sum of values in data for each unique label in regions.
- Parameters:
data (2D array) – input data
regions (2D array of int) – raster with unique IDs for each region, must have the same shape as data.
- Returns:
lbs, sum – arrays of the unique region IDs, and associated sum of input data
- Return type:
1D array