| [ Web Proxy ] |
| Viewing: https://numpy.org/doc/stable/reference/generated/../generated/../generated/numpy.unique_values.html | [Back] [Original] |
Returns the unique elements of an input array x.
This function is an Array API compatible alternative to:
np.unique(x, equal_nan=False, sorted=False)
Changed in version 2.3: The algorithm was changed to a faster one that does not rely on sorting, and hence the results are no longer implicitly sorted.
Input array. It will be flattened if it is not already 1-D.
The unique elements of an input array.
See also
uniqueFind the unique elements of an array.
Examples
>>> import numpy as np
>>> np.unique_values([1, 1, 2])
array([1, 2]) # may vary
| Web Proxy Viewer | New URL | Original Page |