From 00dda8df893d2df8730e0977178f1a116ec9cf91 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 12 Jan 2021 16:36:41 -0700 Subject: Add basic docstrings to the array API wrapper functions The docstrings just point back to the functions they wrap for now. More thought may need to be put into this for the future. Most functions can actually perhaps inherit the docstring of the function they wrap directly, but there are some functions that have differences (e.g., different names, different keyword arguments, fewer keyword arguments, etc.). There's also the question of how to handle cross-references/see alsos that point to functions not in the API spec and behavior shown in docstring examples that isn't required in the spec. --- numpy/_array_api/_utility_functions.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'numpy/_array_api/_utility_functions.py') diff --git a/numpy/_array_api/_utility_functions.py b/numpy/_array_api/_utility_functions.py index 0bbdef412..19743d15c 100644 --- a/numpy/_array_api/_utility_functions.py +++ b/numpy/_array_api/_utility_functions.py @@ -1,7 +1,17 @@ import numpy as np def all(x, /, *, axis=None, keepdims=False): + """ + Array API compatible wrapper for :py:func:`np.all `. + + See its docstring for more information. + """ return np.all(x, axis=axis, keepdims=keepdims) def any(x, /, *, axis=None, keepdims=False): + """ + Array API compatible wrapper for :py:func:`np.any `. + + See its docstring for more information. + """ return np.any(x, axis=axis, keepdims=keepdims) -- cgit v1.2.1