From 2c05353e8342c555604be78a640646bc01511208 Mon Sep 17 00:00:00 2001 From: Tobias Pitters Date: Wed, 10 Jun 2020 02:03:03 +0200 Subject: fix _scalar_or_0d in _lerp --- numpy/lib/function_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 645a77cdb..a3044f27d 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -3877,7 +3877,7 @@ def _lerp(a, b, t, out=None): """ Linearly interpolate from a to b by a factor of t """ diff_b_a = subtract(b, a) - _scalar_or_0d = lambda x: np.isscalar(a) or np.ndim(x) == 0 + _scalar_or_0d = lambda x: np.isscalar(x) or np.ndim(x) == 0 if _scalar_or_0d(a) and _scalar_or_0d(b) and _scalar_or_0d(t): if t <= 0.5: return add(a, diff_b_a * t, out=out) -- cgit v1.2.1