pytutorial/numpy/unique
David Rotermund e7f6e2d747
Create README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
2023-12-29 19:02:01 +01:00
..
README.md Create README.md 2023-12-29 19:02:01 +01:00

Unique

{:.no_toc}

* TOC {:toc}

The goal

Questions to David Rotermund

numpy.unique

numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False, axis=None, *, equal_nan=True)

Find the unique elements of an array.

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
  • the indices of the unique array that reconstruct the input array
  • the number of times each unique value comes up in the input array