cupynumeric.unique_inverse#
- cupynumeric.unique_inverse(
- x: ndarray,
- /,
Find unique values and the indices needed to reconstruct the input.
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 whose
valuesfield contains the unique values and whoseinverse_indicesfield has the shape of x and reconstructs the input fromvalues.- Return type:
namedtuple
See also
- Availability:
Multiple GPUs, Multiple CPUs