[Numpy-discussion] Re: Feature query: fetch top/bottom k from array

2022-02-23 Thread Joseph Bolton
Morning! I find myself often requiring the indices and/or values of the top (or bottom) k items in a numpy array. I am aware of solutions involving *partition*/*argpartition *but I find these inelegant (or using *sort *but these are inefficient). Is this a feature that would benefit the numpy pac

[Numpy-discussion] Re: Feature query: fetch top/bottom k from array

2022-02-23 Thread Friedrich Romstedt
Am Di., 22. Feb. 2022 um 14:25 Uhr schrieb Joseph Bolton : > > 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/F4P5U

[Numpy-discussion] Re: Feature query: fetch top/bottom k from array

2022-02-23 Thread Brock Mendel
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 > : > > > > I find myself often requiring the indices and/or values of the

[Numpy-discussion] NumPy Newcomers' Hour – Thursday, February 24th

2022-02-23 Thread Inessa Pawson
Our next Newcomers' Hour is tomorrow, February 24th at 4 pm UTC. We have no agenda this time. Stop by to ask questions or just to say hi. Join the meeting via Zoom: https://us02web.zoom.us/j/87192457898 Cheers, Inessa Inessa Pawson NumPy Contributor Experience Lead __