diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-01-11 16:03:43 -0700 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-01-11 16:03:43 -0700 |
| commit | 012343dec5599418b77512733fc5b8db6bc14c4c (patch) | |
| tree | 13ef3a6bfdcd603036baaf8d65d1647eea749afc /numpy/_array_api/manipulation_functions.py | |
| parent | 33dc7bea24f1ab6c47047b49521e732caeb485d5 (diff) | |
| download | numpy-012343dec5599418b77512733fc5b8db6bc14c4c.tar.gz | |
Add initial array_api sub-namespace
This is based on the function stubs from the array API test suite, and is
currently based on the assumption that NumPy already follows the array API
standard. Now it needs to be modified to fix it in the places where NumPy
deviates (for example, different function names for inverse trigonometric
functions).
Diffstat (limited to 'numpy/_array_api/manipulation_functions.py')
| -rw-r--r-- | numpy/_array_api/manipulation_functions.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/numpy/_array_api/manipulation_functions.py b/numpy/_array_api/manipulation_functions.py new file mode 100644 index 000000000..1934e8e4e --- /dev/null +++ b/numpy/_array_api/manipulation_functions.py @@ -0,0 +1,29 @@ +def concat(arrays, /, *, axis=0): + from .. import concat + return concat(arrays, axis=axis) + +def expand_dims(x, axis, /): + from .. import expand_dims + return expand_dims(x, axis) + +def flip(x, /, *, axis=None): + from .. import flip + return flip(x, axis=axis) + +def reshape(x, shape, /): + from .. import reshape + return reshape(x, shape) + +def roll(x, shift, /, *, axis=None): + from .. import roll + return roll(x, shift, axis=axis) + +def squeeze(x, /, *, axis=None): + from .. import squeeze + return squeeze(x, axis=axis) + +def stack(arrays, /, *, axis=0): + from .. import stack + return stack(arrays, axis=axis) + +__all__ = ['concat', 'expand_dims', 'flip', 'reshape', 'roll', 'squeeze', 'stack'] |
