8000 DOC: add `unique_inverse` example · mathomp4/numpy@c3d970c · GitHub
[go: up one dir, main page]

Skip to content

Commit c3d970c

Browse files
committed
DOC: add unique_inverse example
1 parent 7f6ac72 commit c3d970c

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
@@ -520,6 +520,11 @@ def unique_inverse(x):
520520
--------
521521
unique : Find the unique elements of an array.
522522
523+
Examples
524+
--------
525+
>>> np.unique_inverse([1, 1, 2])
526+
UniqueInverseResult(values=array([1, 2]), inverse_indices=array([0, 0, 1]))
527+
523528
"""
524529
result = unique(
525530
x,

0 commit comments

Comments
 (0)
0