NumPy · Function
np.digitize
Returns the bin index for each value in an array. It supports any shape for x and uses ordered, one-dimensional bin edges.
Last updated
- Since
- 1.10.0
Syntax
numpy.digitize(x, bins, right=False)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
bincounthistogramuniquesearchsorted