You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up of #275. I've found numpy.unique(x, return_counts=True) quite useful. It allows us to build a histogram for the input array x. I'd suggest us to add the following function:
defunique_counts(x, /):
""" return a tuple of two arrays (unique values and counts) """
Activity
leofang commentedon Oct 24, 2021
Can we target this for v2021?
kgryte commentedon Oct 24, 2021
We'd be cutting this quite close. :)
Quite close that is for getting support from other array libraries that this is something we want to add for the 2021 revision.
leofang commentedon Oct 24, 2021
I see. I know NumPy/CuPy have no problem in supporting this, but I am not sure about others.
leofang commentedon Nov 4, 2021
I'll work on this as per the discussion in today's call.
kgryte commentedon Nov 4, 2021
Thanks @leofang!
rgommers commentedon Nov 4, 2021
Seems very reasonable, and if we add it we should indeed add it to the
v2021milestone. Better to do all four newunique_*functions in one go.