pandas.Series has a nlargest/nsmallest method that might be upstream-able.

On Wed, Feb 23, 2022 at 6:28 AM Friedrich Romstedt <
friedrichromst...@gmail.com> wrote:

> Am Di., 22. Feb. 2022 um 14:25 Uhr schrieb Joseph Bolton
> <joseph.jazz.bol...@gmail.com>:
> >
> > I find myself often requiring the indices and/or values of the top (or
> bottom) k items in a numpy array.
>
> There has been discussion about this last year:
>
>
> https://mail.python.org/archives/list/numpy-discussion@python.org/thread/F4P5UVTAKRJJ3OORI6UOWFSUEE5CNTSC/
>
> Mentioned in that thread is the following pull request, which has some
> more discussion:
>
> https://github.com/numpy/numpy/pull/19117
>
> Friedrich
> _______________________________________________
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: jbrockmen...@gmail.com
>
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to