numpy_searchsorted scratch