cupynumeric.partition#

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

Returns a partitioned copy of an array.

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 – Partitioned array with same dtype and shape as a. In case axis is None the result is flattened.

Return type:

ndarray

Notes

The current implementation falls back to cupynumeric.sort.

See also

numpy.partition

Availability:

Multiple GPUs, Multiple CPUs