ENH: change `np.digitize` to use `np.searchsorted`

Currently `np.digitize` uses a linear search to bin the input values, this PR
replaces that with calls to `np.searchsorted`, which performs a binary
search.