On Sun, May 30, 2021 at 10:01 AM Matti Picus <matti.picus@gmail.com> wrote:


Did this function come up at all in the array-API consortium dicussions?

It happens to be in this list of functions which was made last week: https://github.com/data-apis/array-api/issues/187. That list is potential next candidates, based on them being implemented in most but not all libraries. There was no real discussion on `topk` specifically though.

The current version of the array API standard basically contains functionality that is either common to all libraries, or that NumPy has and most other libraries have as well. Given how much harder it is to get functions into NumPy than in other libraries, the "most libraries have it, NumPy does not" set of functions was not investigated much yet. That's also the reason NEP 47 doesn't have any new functions to be added to NumPy except for `from_dlpack`, but only consistency changes like adding keepdims keywords, stacking for linalg functions that are missing that, etc.

Cheers,
Ralf