blob: 91927a3a070d366547f2c11a2995edac5c9e9b50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from __future__ import annotations
from ._types import Tuple, Union, array
import numpy as np
def unique(x: array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[array, Tuple[array, ...]]:
"""
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)
|