summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_set_functions.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-03-05 14:35:35 -0700
committerAaron Meurer <asmeurer@gmail.com>2021-03-05 14:35:35 -0700
commitcdd6bbcdf260a4d6947901604dc8dd64c864c8d4 (patch)
tree947c48482ec001d0dd4f1fa5055bd7d6970bfc30 /numpy/_array_api/_set_functions.py
parent58c2a996afd13f729ec5d2aed77151c8e799548b (diff)
downloadnumpy-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.py3
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))