Back to Numerical Arrays (NumPy)
np.bitwise_count
Computes the number of 1-bits in the absolute value of x.
Syntax
np.bitwise_count(x)
Description
Computes the number of 1-bits in the absolute value of x. Also known as popcount or population count. Input array must be integers.
Parameters
| Name | Description |
|---|---|
| x | - Input array of integers |
Returns
NDArray