cupynumeric.unique_all#

cupynumeric.unique_all(
x: ndarray,
/,
) _UniqueAllResult#

Find unique values and their indices, inverse indices, and counts.

Each NaN is treated as a distinct value. Results are currently sorted, with NaNs placed after non-NaN values.

Parameters:

x (array_like) – Input array. The values are flattened before grouping.

Returns:

out – A result with four fields: values contains the unique values; indices contains their first positions in the flattened input; inverse_indices has the shape of x and reconstructs the input from values; and counts contains occurrence counts.

Return type:

namedtuple

See also

unique

Availability:

Multiple GPUs, Multiple CPUs