Skip to content

Implement return_counts and return_index for unique #1021

Closed as not planned
Closed as not planned
@neosunhan

Description

Feature functionality
numpy.unique provides 2 additional flags that are not present in heat.unique.

  1. return_counts returns the number of times each unique item appears in the original array.
  2. return_index returns the first occurrences of the unique items in the original array.

Additional context

  • unique_all in the Python array API standard requires these flags to return the indices and counts of the unique values.
  • Also see unique_counts in the Python array API standard

Metadata

Assignees

Labels

APIAnything relating the APIenhancementNew feature or requeststale

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions