>>> master = np.array([1,2,3,4,5]) >>> search = np.array([4,2,2,3]) >>> np.searchsorted(master, search) array([3, 1, 1, 2])