summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-07-13 15:53:34 +0100
committerEric Wieser <wieser.eric@gmail.com>2017-07-13 15:58:35 +0100
commit575a48e0da892d447a4d884f024df82c567e6f3f (patch)
treeda75c57b0dc74642999addc06d317aedf8780069 /numpy/lib/function_base.py
parent3484c83f8c65123df2d95078c56deed296c5f2b8 (diff)
downloadnumpy-575a48e0da892d447a4d884f024df82c567e6f3f.tar.gz
BUG: float16 is promoted to float64 by gradient
This isn't the case for `diff`
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index a3db3494c..c291cf587 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1715,7 +1715,7 @@ def gradient(f, *varargs, **kwargs):
slice4 = [slice(None)]*N
otype = f.dtype.char
- if otype not in ['f', 'd', 'F', 'D', 'm', 'M']:
+ if otype not in ['f', 'd', 'F', 'D', 'm', 'M', 'e']:
otype = 'd'
# Difference of datetime64 elements results in timedelta64