bundles / numpy latest / numpy / unique_values
_ArrayFunctionDispatcher
numpy:unique_values
source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/lib/_arraysetops_impl.py :617
Signature
def unique_values ( x ) Summary
Returns the unique elements of an input array x.
Extended Summary
This function is an Array API compatible alternative to
np.unique(x, equal_nan=False, sorted=False)Parameters
x: array_likeInput array. It will be flattened if it is not already 1-D.
Returns
out: ndarrayThe unique elements of an input array.
Examples
import numpy as np
✓np.unique_values([1, 1, 2])
✗See also
- unique
Find the unique elements of an array.
Aliases
-
numpy.unique_values