diff options
author | Uddeshya Singh <singhuddeshyaofficial@gmail.com> | 2018-08-12 11:48:48 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-12 11:48:48 +0530 |
commit | 185d933dbdf7a97782b89e4b95df850b7e1664f7 (patch) | |
tree | e916471e87c72d0f1b8cacab89fed16b62b5ed9c /numpy/lib/function_base.py | |
parent | 1f41265ddac77a66e2bf735ce970952d0f067122 (diff) | |
download | numpy-185d933dbdf7a97782b89e4b95df850b7e1664f7.tar.gz |
Update function_base.py
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 42aee22b7..394185d63 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -304,17 +304,17 @@ def average(a, axis=None, weights=None, returned=False): Returns ------- - average, [sum_of_weights] : array_type or double + retval, [sum_of_weights] : array_type or double Return the average along the specified axis. When `returned` is `True`, return a tuple with the average as the first element and the sum of the weights as the second element. `sum_of_weights` is of the - same type as `average`. The result dtype follows a genereal pattern. - If `weights` is None, the result dtype will be that of `a` , or `float64` + same type as `retval`. The result dtype follows a genereal pattern. + If `weights` is None, the result dtype will be that of `a` , or ``float64`` if `a` is integral. Otherwise, if `weights` is not None and `a` is non- integral, the result type will be the type of lowest precision capable of representing values of both `a` and `weights`. If `a` happens to be integral, the previous rules still applies but the result dtype will - at least be `float64`. + at least be ``float64``. Raises ------ |