diff options
author | Tobias Pitters <tobias.pitters@gmail.com> | 2020-05-26 21:18:46 +0200 |
---|---|---|
committer | Tobias Pitters <tobias.pitters@gmail.com> | 2020-05-27 19:35:59 +0200 |
commit | 2ffcb119c0235ee7b5c169cae65fcac44064b35a (patch) | |
tree | 16e566cc833ed1dde5f8079db38e7bdff02075a5 /numpy/lib/function_base.py | |
parent | 708798bf82299081b040f672173956ac8a39e877 (diff) | |
download | numpy-2ffcb119c0235ee7b5c169cae65fcac44064b35a.tar.gz |
fix symmetry test
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 168623b82..6799b2a4f 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -3876,13 +3876,13 @@ def _quantile_is_valid(q): def _lerp(a, b, t, out=None): """ Linearly interpolate from a to b by a factor of t """ #a + (b-a)*t if t < 0.5 else b - (b-a)*(1-t) - if t < 0.5: - return add(a, subtract(b, a)*t, out=out) - else: - return subtract(b, subtract(b, a)*(1-t), out=out) + #if t < 0.5: + # return add(a, subtract(b, a)*t, out=out) + #else: + # return subtract(b, subtract(b, a)*(1-t), out=out) # a + (b-a)*t - #offset = subtract(b, a) * t - #return add(a, offset, 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, |