ENH: ExtensionArray.searchsorted by TomAugspurger · Pull Request #24350 · pandas-dev/pandas (original) (raw)
Hmm, I'm not sure what to do then. ExtensionArrays are more at the level of an ndarray than a Series.@shoyer, if I were writing an ExtensionArray that also wanted to implement `__array_function__`, is it OK for the name of positional arguments to differ?
On Thu, Dec 20, 2018 at 12:05 PM topper-123 ***@***.***> wrote: ***@***.**** commented on this pull request. ------------------------------ In pandas/core/arrays/base.py <#24350 (comment)>: > @@ -505,6 +506,54 @@ def unique(self): uniques = unique(self.astype(object)) return self._from_sequence(uniques, dtype=self.dtype) + def searchsorted(self, v, side="left", sorter=None): Sorry, meant value, as that is the name used in Series.searchsorted and various other searchsorted implementations in pandas ( Categorical.searchsorted at least, haven’t checked all impl.). I think it`s inconsistent to follow numpy naming here, when pandas’s is better:-) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#24350 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABQHIsqBJDEwwMDdqbdFzQEupGtUfVF7ks5u69GFgaJpZM4ZaO7Y> .