### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Statistics »

# numpy.digitize

`numpy.``digitize`(x, bins)

  Return the index of the bin to which each value of x belongs.

  Each index i returned is such that bins[i-1] <= x < bins[i] if bins is monotonically increasing, or bins [i-1] > x >= bins[i] if bins is monotonically decreasing.

  Beyond the bounds of the bins 0 or len(bins) is returned as appropriate.

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Statistics »