Add a top_k function to NumPy
Maanas Arora via NumPy-Discussion <[email protected]> Wed, 17 Jun 2026 14:55:21 -0400
| Newsgroups | gmane.comp.python.numeric.general |
|---|---|
| Message-ID | <CALqs-ZFX8U3xnjWfakRizoVc=hwBvM7N7bEfEXbYiuCYUuMaXg@mail.gmail.com> |
--===============8977003064291070695==
Content-Type: multipart/alternative; boundary="000000000000a85b740654779aba"
--000000000000a85b740654779aba
Content-Type: text/plain; charset="UTF-8"
Hello all,
Following several discussions (linked below) about the proposal, it was
decided to add a top_k function to NumPy in issue #15128
<https://github.com/numpy/numpy/issues/15128>. I have recently made a PR (
https://github.com/numpy/numpy/pull/31659) to revive this feature which is
now ready to review, and wanted to ping here for awareness and if anyone
has comments.
Thank you,
Maanas Arora
---
Links:
- Mailing list discussions:
-
https://mail.python.org/archives/list/[email protected]/thread/F4P5UVTAKRJJ3OORI6UOWFSUEE5CNTSC/#UWULPEEVC4SRHVW37MSXJJKZL6YUSUFU
-
https://mail.python.org/archives/list/[email protected]/thread/TCRBG6VOHHFMV3CWR3AFTVZK4JTVAG2K/#2IVDQ3AFZLGL6C3WJBHQXSHUOSQKTUP2
- NumPy:
- https://github.com/numpy/numpy/issues/15128
- https://github.com/numpy/numpy/pull/26666
- https://github.com/numpy/numpy/pull/31659
- Array API:
- https://github.com/data-apis/array-api/issues/629
- https://github.com/data-apis/array-api/pull/722
--000000000000a85b740654779aba
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default"><font face=
=3D"arial, sans-serif">Hello all,</font></div><div class=3D"gmail_default">=
<font face=3D"arial, sans-serif"><br></font></div><div class=3D"gmail_defau=
lt"><font face=3D"arial, sans-serif">Following several=C2=A0discussions (li=
nked below) about the proposal, it was decided to add a top_k function to N=
umPy in issue=C2=A0<a href=3D"https://github.com/numpy/numpy/issues/15128">=
#15128</a>.=C2=A0</font><span style=3D"background-color:transparent;font-fa=
mily:arial,sans-serif">I have recently made a PR (</span><span style=3D"bac=
kground-color:transparent"><a href=3D"https://github.com/numpy/numpy/pull/3=
1659">https://github.com/numpy/numpy/pull/31659</a>)</span><span style=3D"b=
ackground-color:transparent;font-family:arial,sans-serif">=C2=A0to revive t=
his feature which is now ready to review, and wanted to ping here for aware=
ness and if anyone has comments.</span></div><div class=3D"gmail_default"><=
span style=3D"background-color:transparent;font-family:arial,sans-serif"><b=
r></span></div><div class=3D"gmail_default"><span style=3D"background-color=
:transparent;font-family:arial,sans-serif">Thank you,</span></div><div clas=
s=3D"gmail_default"><span style=3D"background-color:transparent;font-family=
:arial,sans-serif">Maanas Arora</span></div><div class=3D"gmail_default"><s=
pan style=3D"background-color:transparent;font-family:arial,sans-serif"><br=
></span></div><div class=3D"gmail_default"><span style=3D"background-color:=
transparent;font-family:arial,sans-serif">---</span></div><div class=3D"gma=
il_default"><span style=3D"background-color:transparent;font-family:arial,s=
ans-serif"><br></span></div><div class=3D"gmail_default"><span style=3D"bac=
kground-color:transparent;font-family:arial,sans-serif">Links:</span></div>=
<div class=3D"gmail_default"><ul><li><span style=3D"background-color:transp=
arent;font-family:arial,sans-serif">Mailing list discussions:</span></li><u=
l><li><span style=3D"background-color:transparent;font-family:arial,sans-se=
rif"><a href=3D"https://mail.python.org/archives/list/numpy-discussion@pyth=
on.org/thread/F4P5UVTAKRJJ3OORI6UOWFSUEE5CNTSC/#UWULPEEVC4SRHVW37MSXJJKZL6Y=
USUFU">https://mail.python.org/archives/list/[email protected]/th=
read/F4P5UVTAKRJJ3OORI6UOWFSUEE5CNTSC/#UWULPEEVC4SRHVW37MSXJJKZL6YUSUFU</a>=
</span></li><li><span style=3D"background-color:transparent;font-family:ari=
al,sans-serif"><a href=3D"https://mail.python.org/archives/list/numpy-discu=
[email protected]/thread/TCRBG6VOHHFMV3CWR3AFTVZK4JTVAG2K/#2IVDQ3AFZLGL6C3WJ=
BHQXSHUOSQKTUP2">https://mail.python.org/archives/list/numpy-discussion@pyt=
hon.org/thread/TCRBG6VOHHFMV3CWR3AFTVZK4JTVAG2K/#2IVDQ3AFZLGL6C3WJBHQXSHUOS=
QKTUP2</a></span></li></ul><li><span style=3D"background-color:transparent;=
font-family:arial,sans-serif">NumPy:</span></li><ul><li><span style=3D"back=
ground-color:transparent;font-family:arial,sans-serif"><a href=3D"https://g=
ithub.com/numpy/numpy/issues/15128">https://github.com/numpy/numpy/issues/1=
5128</a></span></li><li><a href=3D"https://github.com/numpy/numpy/pull/2666=
6">https://github.com/numpy/numpy/pull/26666</a></li><li><a href=3D"https:/=
/github.com/numpy/numpy/pull/31659">https://github.com/numpy/numpy/pull/316=
59</a></li></ul><li>Array API:</li><ul><li><a href=3D"https://github.com/da=
ta-apis/array-api/issues/629">https://github.com/data-apis/array-api/issues=
/629</a></li><li><a href=3D"https://github.com/data-apis/array-api/pull/722=
">https://github.com/data-apis/array-api/pull/722</a></li></ul></ul></div><=
/div>
</div>
--000000000000a85b740654779aba--
--===============8977003064291070695==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]
--===============8977003064291070695==--