Back to Numerical Arrays (NumPy)
np.bincount
Count number of occurrences of each value in array of non-negative ints.
Syntax
np.bincount(x, weights?, minlength?)
Description
Count number of occurrences of each value in array of non-negative ints.
Parameters
| Name | Description |
|---|---|
| x | - Input array of non-negative integers |
| weights(optional) | - Weights, array of the same shape as x (optional) |
| minlength(optional) | - Minimum number of bins for the output array (default: 0) |
Returns
Promise<NDArray>