cupynumeric.argpartition#

cupynumeric.argpartition(
a: ndarray,
kth: int | Sequence[int],
axis: int | None = -1,
kind: SelectKind = 'introselect',
order: str | list[str] | None = None,
) ndarray#

Perform an indirect partition along the given axis.

Parameters:
  • a (array_like) – Input array.

  • kth (int or Sequence[int])

  • axis (int or None, optional) – Axis to partition. By default, the index -1 (the last axis) is used. If None, the flattened array is used.

  • kind ({'introselect'}, optional) – Currently not supported.

  • order (str or list[str], optional) – Currently not supported.

Returns:

out – Array of indices that partitions a along the specified axis. It has the same shape as a.shape or is flattened in case of axis is None.

Return type:

ndarray[int]

Notes

The current implementation falls back to cupynumeric.argsort.

Availability:

Multiple GPUs, Multiple CPUs