8000 Merge pull request #26631 from luxedo/DOC/21351/np/unique_inverse · mathomp4/numpy@4443a46 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4443a46

Browse files
authored
Merge pull request numpy#26631 from luxedo/DOC/21351/np/unique_inverse
DOC: add `unique_inverse` example
2 parents a9f77ea + c3d970c commit 4443a46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

numpy/lib/_arraysetops_impl.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,11 @@ def unique_inverse(x):
525525
--------
526526
unique : Find the unique elements of an array.
527527
528+
Examples
529+
--------
530+
>>> np.unique_inverse([1, 1, 2])
531+
UniqueInverseResult(values=array([1, 2]), inverse_indices=array([0, 0, 1]))
532+
528533
"""
529534
result = unique(
530535
x,

0 commit comments

Comments
 (0)
0