From dee44e6acef8e2151d5428bfeb6cbb64689340f9 Mon Sep 17 00:00:00 2001 From: Pieter Eendebak Date: Mon, 27 Jun 2022 20:57:39 +0200 Subject: Update numpy/core/function_base.py Co-authored-by: Sebastian Berg --- numpy/core/function_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/function_base.py') diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index baaf960de..178e6a26a 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -142,8 +142,8 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, if div > 0: _mult_inplace = _nx.isscalar(delta) step = delta / div - any_step_zero = step == 0 if _mult_inplace else \ - _nx.asarray(step == 0).any() + any_step_zero = ( + step == 0 if _mult_inplace else _nx.asarray(step == 0).any()) if any_step_zero: # Special handling for denormal numbers, gh-5437 y /= div -- cgit v1.2.1