summaryrefslogtreecommitdiff
path: root/numpy/core/function_base.py
diff options
context:
space:
mode:
authorPieter Eendebak <pieter.eendebak@gmail.com>2022-06-27 20:57:39 +0200
committerGitHub <noreply@github.com>2022-06-27 20:57:39 +0200
commitdee44e6acef8e2151d5428bfeb6cbb64689340f9 (patch)
tree1f61f6b1dc94d4d3877e1bcd905146510d73f3f1 /numpy/core/function_base.py
parentece97833e1506f0223b9dcfa637d60640db75008 (diff)
downloadnumpy-dee44e6acef8e2151d5428bfeb6cbb64689340f9.tar.gz
Update numpy/core/function_base.py
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r--numpy/core/function_base.py4
1 files changed, 2 insertions, 2 deletions
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