Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit edb9399

Browse files
committed
Update docstring of ma.extras.average to reflect actual behavior
1 parent 72f409c commit edb9399

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

numpy/ma/extras.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,9 @@ def average(a, axis=None, weights=None, returned=False):
497497
The average along the specified axis. When returned is `True`,
498498
return a tuple with the average as the first element and the sum
499499
of the weights as the second element. The return type is `np.float64`
500-
if `a` is of integer type, otherwise it is of the same type as `a`.
501-
If returned, `sum_of_weights` is of the same type as `average`.
500+
if `a` is of integer type and floats smaller than `float64`, or the
501+
input data-type, otherwise. If returned, `sum_of_weights` is always
502+
`float64`.
502503
503504
Examples
504505
--------

0 commit comments

Comments
 (0)