Skip to content

Add unique_counts()? #291

Closed
Closed
@leofang

Description

@leofang

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:

def unique_counts(x, /):
   """
   return a tuple of two arrays (unique values and counts)
   """

Metadata

Metadata

Assignees

Labels

API extensionAdds new functions or objects to the API.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions