cupyx.scipy.ndimage.extrema#

cupyx.scipy.ndimage.extrema(input, labels=None, index=None)[source]#

Calculate the minimums and maximums of the values of an array at labels, along with their positions.

Parameters:
  • input (cupy.ndarray) – N-D image data to process.

  • labels (cupy.ndarray, optional) – Labels of features in input. If not None, must be same shape as input.

  • index (int or sequence of ints, optional) – Labels to include in output. If None (default), all values where non-zero labels are used.

Returns:

A tuple that contains the following values.

minimums (cupy.ndarray): Values of minimums in each feature.

maximums (cupy.ndarray): Values of maximums in each feature.

min_positions (tuple or list of tuples): Each tuple gives the N-D coordinates of the corresponding minimum.

max_positions (tuple or list of tuples): Each tuple gives the N-D coordinates of the corresponding maximum.