Skip to content

Feature request: Allow np.argmax to output top K maximum values #15128

@regstrtn

Description

@regstrtn

Currently np.argmax, np.argmin, np.max and np.min return the maximum and minimum values respectively.
numpy.argmax(a, axis=None, out=None)
Often times we need to get the topKmax or topKmin values, mostly in the case of machine learning workloads where you need top K classes for a given input.
Requesting support for these scenarios in numpy. This scenario could be supported by np.max (and other functions), or there could be a separate family of methods np.maxK, minK etc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    01 - Enhancement62 - Python APIChanges or additions to the Python API. Mailing list should usually be notified.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy