diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-03-05 14:35:35 -0700 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-03-05 14:35:35 -0700 |
| commit | cdd6bbcdf260a4d6947901604dc8dd64c864c8d4 (patch) | |
| tree | 947c48482ec001d0dd4f1fa5055bd7d6970bfc30 /numpy/_array_api/_set_functions.py | |
| parent | 58c2a996afd13f729ec5d2aed77151c8e799548b (diff) | |
| download | numpy-cdd6bbcdf260a4d6947901604dc8dd64c864c8d4.tar.gz | |
Support the ndarray object in the remaining array API functions
Diffstat (limited to 'numpy/_array_api/_set_functions.py')
| -rw-r--r-- | numpy/_array_api/_set_functions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/_array_api/_set_functions.py b/numpy/_array_api/_set_functions.py index 91927a3a0..f5cd6d324 100644 --- a/numpy/_array_api/_set_functions.py +++ b/numpy/_array_api/_set_functions.py @@ -1,6 +1,7 @@ from __future__ import annotations from ._types import Tuple, Union, array +from ._array_object import ndarray import numpy as np @@ -10,4 +11,4 @@ def unique(x: array, /, *, return_counts: bool = False, return_index: bool = Fal See its docstring for more information. """ - return np.unique(x, return_counts=return_counts, return_index=return_index, return_inverse=return_inverse) + return ndarray._new(np.unique(x._array, return_counts=return_counts, return_index=return_index, return_inverse=return_inverse)) |
