@@ -117,10 +117,9 @@ def __unicode__(self):
117117 quote_strings = True )
118118 return "%s(%s, dtype='%s')" % (type (self ).__name__ , prepr , self .dtype )
119119
120- def searchsorted (self , v , side = ' left' , sorter = None ):
120+ def searchsorted (self , value , side = " left" , sorter = None ):
121121 """
122- Find indices where elements of v should be inserted
123- in a to maintain order.
122+ Find indices to insert `value` so as to maintain order.
124123
125124 For full documentation, see `numpy.searchsorted`
126125
@@ -129,17 +128,20 @@ def searchsorted(self, v, side='left', sorter=None):
129128 numpy.searchsorted : equivalent function
130129 """
131130
132- # we are much more performant if the searched
133- # indexer is the same type as the array
134- # this doesn't matter for int64, but DOES
131+ # We are much more performant if the searched
132+ # indexer is the same type as the array.
133+ #
134+ # This doesn't matter for int64, but DOES
135135 # matter for smaller int dtypes
136- # https://github.com/numpy/numpy/issues/5370
136+ #
137+ # xref: https://github.com/numpy/numpy/issues/5370
137138 try :
138- v = self .dtype .type (v )
139+ value = self .dtype .type (value )
139140 except :
140141 pass
142+
141143 return super (FrozenNDArray , self ).searchsorted (
142- v , side = side , sorter = sorter )
144+ value , side = side , sorter = sorter )
143145
144146
145147def _ensure_frozen (array_like , categories , copy = False ):
0 commit comments