summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_set_functions.py
blob: fd1438be5d48a5fc67d856f8aa97b15f06e271b7 (plain)
1
2
3
4
5
6
7
8
9
import numpy as np

def unique(x, /, *, return_counts=False, return_index=False, return_inverse=False, sorted=True):
    """
    Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.

    See its docstring for more information.
    """
    return np.unique(x, return_counts=return_counts, return_index=return_index, return_inverse=return_inverse, sorted=sorted)