From 012343dec5599418b77512733fc5b8db6bc14c4c Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 11 Jan 2021 16:03:43 -0700 Subject: 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). --- numpy/_array_api/utility_functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 numpy/_array_api/utility_functions.py (limited to 'numpy/_array_api/utility_functions.py') diff --git a/numpy/_array_api/utility_functions.py b/numpy/_array_api/utility_functions.py new file mode 100644 index 000000000..eac0d4eaa --- /dev/null +++ b/numpy/_array_api/utility_functions.py @@ -0,0 +1,9 @@ +def all(x, /, *, axis=None, keepdims=False): + from .. import all + return all(x, axis=axis, keepdims=keepdims) + +def any(x, /, *, axis=None, keepdims=False): + from .. import any + return any(x, axis=axis, keepdims=keepdims) + +__all__ = ['all', 'any'] -- cgit v1.2.1