From 204967a55567d13eae5cfb27f1091ecc70abf164 Mon Sep 17 00:00:00 2001 From: Jaime Fernandez Date: Sat, 28 Feb 2015 19:23:13 -0800 Subject: [PATCH] DOC: Describe return_counts keyword in np.unique docstring --- numpy/lib/arraysetops.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index cb24eb24ee70..7776d7e769a6 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -97,10 +97,11 @@ def unique(ar, return_index=False, return_inverse=False, return_counts=False): """ Find the unique elements of an array. - Returns the sorted unique elements of an array. There are two optional + Returns the sorted unique elements of an array. There are three optional outputs in addition to the unique elements: the indices of the input array - that give the unique values, and the indices of the unique array that - reconstruct the input array. + that give the unique values, the indices of the unique array that + reconstruct the input array, and the number of times each unique value + comes up in the input array. Parameters ----------