ENH: add a 'return_counts=' keyword argument to `np.unique`

9 Jan
2014
9 Jan
'14
10:32 a.m.
Hi,
I have just sent a PR, adding a `return_counts` keyword argument to `np.unique` that does exactly what the name suggests: counting the number of times each unique time comes up in the array. It reuses the `flag` array that is constructed whenever any optional index is requested, extracts the indices of the `True`s in it, and returns their diff. You can check it here:
https://github.com/numpy/numpy/pull/4180
Regards,
Jaime
--
(__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
de dominación mundial.
3546
Age (days ago)
3546
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jaime Fernández del Río