diff options
author | Matti Picus <matti.picus@gmail.com> | 2021-02-06 19:36:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 19:36:36 +0200 |
commit | 32b564ade7ef22439b5f2b9c11aa4c63f0ecd6fd (patch) | |
tree | 51324add1559ccd3e26e9d5dac6543773175ed2d | |
parent | 19558e50d57299de8dc20090025ad199e4b80474 (diff) | |
parent | e5a5c7a90feeafe8596bb3e6ce9d587282a572f5 (diff) | |
download | numpy-32b564ade7ef22439b5f2b9c11aa4c63f0ecd6fd.tar.gz |
Merge pull request #18342 from zolboo1024/trapz_doc
DOC: Specified all possible return types for trapz function #18140
-rw-r--r-- | numpy/lib/function_base.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 276ffa5d4..d33a0fa7d 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -4100,9 +4100,12 @@ def trapz(y, x=None, dx=1.0, axis=-1): Returns ------- - trapz : float - Definite integral as approximated by trapezoidal rule. - + trapz : float or ndarray + Definite integral of 'y' = n-dimensional array as approximated along + a single axis by the trapezoidal rule. If 'y' is a 1-dimensional array, + then the result is a float. If 'n' is greater than 1, then the result + is an 'n-1' dimensional array. + See Also -------- sum, cumsum @@ -4245,7 +4248,7 @@ def meshgrid(*xi, copy=True, sparse=False, indexing='xy'): See Also -------- mgrid : Construct a multi-dimensional "meshgrid" using indexing notation. - ogrid : Construct an open multi-dimensional "meshgrid" using indexing + ogrid : Construct an open multi-dimensional "meshgrid" using indexing notation. Examples |