cupyx.scipy.ndimage.histogram#

cupyx.scipy.ndimage.histogram(input, min, max, bins, labels=None, index=None)[source]#

Calculate the histogram of the values of an array, optionally at labels.

Histogram calculates the frequency of values in an array within bins determined by min, max, and bins. The labels and index keywords can limit the scope of the histogram to specified sub-regions within the array.

Parameters:
  • input (cupy.ndarray) – Data for which to calculate histogram.

  • min (int) – Minimum values of range of histogram bins.

  • max (int) – Maximum values of range of histogram bins.

  • bins (int) – Number of bins.

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

  • index (int or sequence of ints, optional) – Label or labels for which to calculate histogram. If None, all values where label is greater than zero are used.

Returns:

Histogram counts.

Return type:

cupy.ndarray