diff options
author | zolboo1024 <erdenebz@dickinson.edu> | 2021-02-05 14:55:43 -0500 |
---|---|---|
committer | zolboo1024 <erdenebz@dickinson.edu> | 2021-02-05 14:55:43 -0500 |
commit | e5a5c7a90feeafe8596bb3e6ce9d587282a572f5 (patch) | |
tree | 5bfcc67483bd5c20b7c4bb8862eada8238776dfe /numpy/lib/function_base.py | |
parent | c922e983b4048a8710871c9394cc5ad6c4a8be2c (diff) | |
download | numpy-e5a5c7a90feeafe8596bb3e6ce9d587282a572f5.tar.gz |
Specified the return type for trapz to include the possibility of ndarray being returned
Diffstat (limited to 'numpy/lib/function_base.py')
-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 |