summaryrefslogtreecommitdiff
path: root/numpy/core/_methods.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2017-01-24 16:07:52 +0100
committerJulian Taylor <jtaylor.debian@googlemail.com>2017-01-24 16:14:24 +0100
commit9ae84854d9c48a751e57c5cd0e9636678a6d2359 (patch)
treeb159857c74b977a84b05c184e5c8e9f734215c2e /numpy/core/_methods.py
parent5da51cba3367432cdb6ae3ee3834509c306b737d (diff)
downloadnumpy-9ae84854d9c48a751e57c5cd0e9636678a6d2359.tar.gz
BUG: fix mean for float 16 non-array inputs
Diffstat (limited to 'numpy/core/_methods.py')
-rw-r--r--numpy/core/_methods.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/_methods.py b/numpy/core/_methods.py
index abfd0a3cc..c05316d18 100644
--- a/numpy/core/_methods.py
+++ b/numpy/core/_methods.py
@@ -72,10 +72,10 @@ def _mean(a, axis=None, dtype=None, out=None, keepdims=False):
ret = um.true_divide(
ret, rcount, out=ret, casting='unsafe', subok=False)
if is_float16_result and out is None:
- ret = a.dtype.type(ret)
+ ret = arr.dtype.type(ret)
elif hasattr(ret, 'dtype'):
if is_float16_result:
- ret = a.dtype.type(ret / rcount)
+ ret = arr.dtype.type(ret / rcount)
else:
ret = ret.dtype.type(ret / rcount)
else: