diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-08 17:22:47 -0600 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-08 17:22:47 -0600 |
| commit | aee3a56d4e150a55c590966c9cc2ae0e201fa936 (patch) | |
| tree | cb2519e418f8e7b0ad850c5e8c094a801472d9ef /numpy/_array_api/_set_functions.py | |
| parent | fc1ff6fc3045482a72c359689ee7bfa7e3299985 (diff) | |
| download | numpy-aee3a56d4e150a55c590966c9cc2ae0e201fa936.tar.gz | |
Rename the array class in the array API namespace from ndarray to Array
The actual class name doesn't matter because it isn't part of the namespace
API (arrays should be constructed with the array creation functions like
asarray()). However, it is better to use a name that is different from the
existing NumPy array object to avoid ambiguity.
Diffstat (limited to 'numpy/_array_api/_set_functions.py')
| -rw-r--r-- | numpy/_array_api/_set_functions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/_array_api/_set_functions.py b/numpy/_array_api/_set_functions.py index 719d54e5f..098145866 100644 --- a/numpy/_array_api/_set_functions.py +++ b/numpy/_array_api/_set_functions.py @@ -1,10 +1,10 @@ from __future__ import annotations -from ._array_object import ndarray +from ._array_object import Array from typing import TYPE_CHECKING if TYPE_CHECKING: - from ._types import Tuple, Union, Array + from ._types import Tuple, Union import numpy as np @@ -14,4 +14,4 @@ def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = Fal See its docstring for more information. """ - return ndarray._new(np.unique(x._array, return_counts=return_counts, return_index=return_index, return_inverse=return_inverse)) + return Array._new(np.unique(x._array, return_counts=return_counts, return_index=return_index, return_inverse=return_inverse)) |
