[Numpy-discussion] "arg" searchsorted

Bryan Van de Ven bryanv@continuum...
Tue Mar 27 10:59:31 CDT 2012


>     Sure, that would be easy enough to implement. I don't really have
>     a preference, is there a reason you would prefer that API?
>
>
> No, just exploring possibilities. Another would be a different name, 
> searchargsorted or some such. I actually think that is a better 
> alternative than the pair, but it would add another method to ndarray.

I guess after thinking about it my own personal preference is for just 
adding the sorter argument, perhaps others can weigh in. Just to 
summarize, the proposals fo far:

     np.searchsorted(a, 12, sorter=s)

     np.searchsorted((a,s), 12)

     np.searchargsorted(a, s, 12)


Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120327/0fee548f/attachment.html 


More information about the NumPy-Discussion mailing list