sidx = np.argsort(searchvals)
left_idx = np.searchsorted(searchvals, values, sorter=sidx, side='left')
right_idx = np.searchsorted(searchvals, values, sorter=sidx, side='right')
Numpy int array: Find indices of multiple target ints