diff options
author | Frederic Bastien <nouiz@nouiz.org> | 2016-10-28 20:09:45 -0400 |
---|---|---|
committer | Frederic Bastien <nouiz@nouiz.org> | 2016-10-28 21:33:04 -0400 |
commit | 530d67191287b8dc625bfc49664ad08b22e9e4d3 (patch) | |
tree | 66853b1486805c1f205f287fd207295d02697ed8 /numpy/core/fromnumeric.py | |
parent | 6ae842001332f532e0c76815d49336ecc2b88dde (diff) | |
download | numpy-530d67191287b8dc625bfc49664ad08b22e9e4d3.tar.gz |
[ENH]Make numpy.mean() do more precise computation without changing the output dtype that stay in float16.
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 84fdab7cc..a5c63ba84 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2790,6 +2790,8 @@ def mean(a, axis=None, dtype=None, out=None, keepdims=np._NoValue): Returns the average of the array elements. The average is taken over the flattened array by default, otherwise over the specified axis. `float64` intermediate and return values are used for integer inputs. + `float32` intermediate are used for `float16` inputs for extra + precision. Parameters ---------- |