summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 48b0a0830..3fb45b09a 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -3875,7 +3875,8 @@ def _quantile_is_valid(q):
def _lerp(a, b, t, out=None):
""" Linearly interpolate from a to b by a factor of t """
- return add(a*(1 - t), b*t, out=out)
+ offset = subtract(b, a) * t
+ return add(a, offset, out=out)
def _quantile_ureduce_func(a, q, axis=None, out=None, overwrite_input=False,
@@ -3948,6 +3949,7 @@ def _quantile_ureduce_func(a, q, axis=None, out=None, overwrite_input=False,
else:
# weight the points above and below the indices
+ #import pdb; pdb.set_trace()
indices_below = not_scalar(floor(indices)).astype(intp)
indices_above = not_scalar(indices_below + 1)