cupy.bincount¶
-
cupy.
bincount
(x, weights=None, minlength=None)[source]¶ Count number of occurrences of each value in array of non-negative ints.
- Parameters
x (cupy.ndarray) – Input array.
weights (cupy.ndarray) – Weights array which has the same shape as
x
.minlength (int) – A minimum number of bins for the output array.
- Returns
- The result of binning the input array. The length of
output is equal to
max(cupy.max(x) + 1, minlength)
.
- Return type
Warning
This function may synchronize the device.
See also