Skip to content

Commit 8ed8725

Browse files
committed
DOC: add unique_counts example
1 parent 7f6ac72 commit 8ed8725

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
@@ -476,6 +476,11 @@ def unique_counts(x):
476476
--------
477477
unique : Find the unique elements of an array.
478478
479+
Examples
480+
--------
481+
>>> np.unique_counts([1, 1, 2])
482+
UniqueCountsResult(values=array([1, 2]), counts=array([2, 1]))
483+
479484
"""
480485
result = unique(
481486
x,

0 commit comments

Comments
 (0)