diff options
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 ------ |