cupyx.scipy.ndimage.sum_labels#
- cupyx.scipy.ndimage.sum_labels(input, labels=None, index=None)[source]#
- Calculates the sum of the values of an n-D image array, optionally
at specified sub-regions.
- Parameters:
input (cupy.ndarray) – Nd-image data to process.
labels (cupy.ndarray or None) – Labels defining sub-regions in input. If not None, must be same shape as input.
index (cupy.ndarray or None) – labels to include in output. If None (default), all values where labels is non-zero are used.
- Returns:
sum of values, for each sub-region if labels and index are specified.
- Return type:
sum (cupy.ndarray)
See also