diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-04-28 16:36:11 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-04-28 16:40:32 -0600 |
commit | 6115cce356868d4b62ac25fc6777e3bdd0a7eb57 (patch) | |
tree | c2af5dfba8effa39997c856821dcc29ab232e5dd /numpy/_array_api/_manipulation_functions.py | |
parent | b0b2539208a650ef5651fdfb9c16d57c8412d1c7 (diff) | |
download | numpy-6115cce356868d4b62ac25fc6777e3bdd0a7eb57.tar.gz |
Update signatures in the array API namespace from the latest version of the spec
Diffstat (limited to 'numpy/_array_api/_manipulation_functions.py')
-rw-r--r-- | numpy/_array_api/_manipulation_functions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/_array_api/_manipulation_functions.py b/numpy/_array_api/_manipulation_functions.py index 6ac7be02f..fb9e25baa 100644 --- a/numpy/_array_api/_manipulation_functions.py +++ b/numpy/_array_api/_manipulation_functions.py @@ -18,7 +18,7 @@ def concat(arrays: Tuple[array, ...], /, *, axis: Optional[int] = 0) -> array: arrays = tuple(a._array for a in arrays) return ndarray._new(np.concatenate(arrays, axis=axis)) -def expand_dims(x: array, axis: int, /) -> array: +def expand_dims(x: array, /, *, axis: int) -> array: """ Array API compatible wrapper for :py:func:`np.expand_dims <numpy.expand_dims>`. @@ -34,7 +34,7 @@ def flip(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None) -> """ return ndarray._new(np.flip(x._array, axis=axis)) -def reshape(x: array, shape: Tuple[int, ...], /) -> array: +def reshape(x: array, /, shape: Tuple[int, ...]) -> array: """ Array API compatible wrapper for :py:func:`np.reshape <numpy.reshape>`. @@ -42,7 +42,7 @@ def reshape(x: array, shape: Tuple[int, ...], /) -> array: """ 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: +def roll(x: array, /, shift: Union[int, Tuple[int, ...]], *, axis: Optional[Union[int, Tuple[int, ...]]] = None) -> array: """ Array API compatible wrapper for :py:func:`np.roll <numpy.roll>`. |