Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
np.searchsorted fails on Index due to Index.searchsorted not taking a sorter argument. #12238
import numpy, pandas ix = pandas.Float64Index([1,2,3]) numpy.searchsorted(ix, 2.5)
The reason is that the interface of Index.searchsorted(self, key, side='left') doesn't match numpy.ndarray.searchsorted(self, v, side='left', sorter=None) and numpy.searchsorted is implemented as
This is pandas 0.17.1 (but the relevant code seems to appear in master) and numpy 1.10.4 .