Skip to content

BUG/DOC: searchsorted with sorter giving ValueError could not parse sorter #8490

@jorisvandenbossche

Description

@jorisvandenbossche

I get an error while building the docs with searchsorted (but there is not error on the travis docs, http://pandas-docs.github.io/pandas-docs-travis/basics.html#sorting-by-index-and-value):

In [22]: ser = Series([3, 1, 2]) In [23]: a = ser.values In [24]: a.searchsorted([0,3], sorter=np.argsort(a)) Out[24]: array([0, 2]) In [25]: ser.searchsorted([0,3], sorter=np.argsort(ser)) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-25-d96921d13837> in <module>() ----> 1 ser.searchsorted([0,3], sorter=np.argsort(ser)) /home/joris/scipy/pandas/pandas/core/series.pyc in searchsorted(self, v, side, sorter) 1431 """ 1432 return self.values.searchsorted(Series(v).values, side=side, -> 1433 sorter=sorter) 1434 1435 #------------------------------------------------------------------------------ ValueError: could not parse sorter argument In [26]: pd.__version__ Out[26]: '0.14.1-641-gd65c9d7' In [27]: np.__version__ Out[27]: '1.9.0' 

Metadata

Metadata

Assignees

No one assigned

    Labels

    AlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffDocs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions