Skip to content

Implement NumPy search routines #2080

@shoyer

Description

@shoyer

xref https://docs.scipy.org/doc/numpy/reference/routines.sort.html

Extracted from #70:

  • np.argmax
  • np.argmin
  • np.argwhere
  • np.compress
  • np.nonzero
  • np.flatnonzero
  • np.where
  • np.searchsorted
  • np.extract

(see #2077 for nanargmax/nanargmin)

Notes:

  • argwhere/flatnonzero/extractcould should just be minimal wrappers around nonzero
  • searchsorted is harder: it need would need low-level routines/wrappers for efficient binary search, which to my knowledge do not currently existing in XLA

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions