diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-03-02 16:29:07 -0700 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-03-02 16:29:07 -0700 |
commit | 7132764661b01e2f15a66d7c39d74ad4b2d434a9 (patch) | |
tree | 90a3dcbb52452f84ca67de8a7c1eb9eb44e8b6d9 /numpy/_array_api/_manipulation_functions.py | |
parent | 63be085194ddf9d2d8fc32a0ccbe30936c78d870 (diff) | |
download | numpy-7132764661b01e2f15a66d7c39d74ad4b2d434a9.tar.gz |
Remove _implementation from the array API functions
As discussed at
https://mail.python.org/pipermail/numpy-discussion/2021-February/081541.html,
_implementation is not as useful for the array API module as previously
thought.
Diffstat (limited to 'numpy/_array_api/_manipulation_functions.py')
-rw-r--r-- | numpy/_array_api/_manipulation_functions.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/_array_api/_manipulation_functions.py b/numpy/_array_api/_manipulation_functions.py index 413dbb1b1..1631a924f 100644 --- a/numpy/_array_api/_manipulation_functions.py +++ b/numpy/_array_api/_manipulation_functions.py @@ -21,7 +21,7 @@ def expand_dims(x: array, axis: int, /) -> array: See its docstring for more information. """ - return ndarray._new(np.expand_dims._implementation(x._array, axis)) + return ndarray._new(np.expand_dims(x._array, axis)) def flip(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None) -> array: """ @@ -29,7 +29,7 @@ def flip(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None) -> See its docstring for more information. """ - return ndarray._new(np.flip._implementation(x._array, axis=axis)) + return ndarray._new(np.flip(x._array, axis=axis)) def reshape(x: array, shape: Tuple[int, ...], /) -> array: """ @@ -37,7 +37,7 @@ def reshape(x: array, shape: Tuple[int, ...], /) -> array: See its docstring for more information. """ - return ndarray._new(np.reshape._implementation(x._array, shape)) + return ndarray._new(np.reshape(x._array, shape)) def roll(x: array, shift: Union[int, Tuple[int, ...]], /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None) -> array: """ @@ -45,7 +45,7 @@ def roll(x: array, shift: Union[int, Tuple[int, ...]], /, *, axis: Optional[Unio See its docstring for more information. """ - return ndarray._new(np.roll._implementation(x._array, shift, axis=axis)) + return ndarray._new(np.roll(x._array, shift, axis=axis)) def squeeze(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None) -> array: """ @@ -53,7 +53,7 @@ def squeeze(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None) See its docstring for more information. """ - return ndarray._array(np.squeeze._implementation(x._array, axis=axis)) + return ndarray._array(np.squeeze(x._array, axis=axis)) def stack(arrays: Tuple[array], /, *, axis: int = 0) -> array: """ @@ -62,4 +62,4 @@ def stack(arrays: Tuple[array], /, *, axis: int = 0) -> array: See its docstring for more information. """ arrays = tuple(a._array for a in arrays) - return ndarray._array(np.stack._implementation(arrays, axis=axis)) + return ndarray._array(np.stack(arrays, axis=axis)) |