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

2022-02-22 Thread Joseph Bolton
Morning, My apologies if this deviates from the vision of numpy: 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 these are inelegant. I am thinking of 1-dimensional arrays, but

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

2022-02-22 Thread Joseph Fox-Rabinovitz
Joe, Could you show an example that you find inelegant and elaborate on how you intend to improve it? It's hard to discuss without more specific information. - Joe On Tue, Feb 22, 2022, 07:23 Joseph Bolton wrote: > Morning, > > My apologies if this deviates from the vision of numpy: > > I find

[Numpy-discussion] Re: NEP draft for the future behaviour of scalar promotion

2022-02-22 Thread Sebastian Berg
On Tue, 2022-02-22 at 01:43 -0600, Juan Nunez-Iglesias wrote: > > On Tue, 22 Feb 2022, at 1:01 AM, Stefan van der Walt wrote: > > it is easier to explain away `x + 1` behaving oddly over `x[0] + 1` > > behaving oddly > > Is it? I find the two equivalent, honestly. > > > given that we pretend lik

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-02-22 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, February 23rd at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issue