summaryrefslogtreecommitdiff
path: root/numpy/core/function_base.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2022-07-06 18:57:36 -0700
committerGitHub <noreply@github.com>2022-07-06 18:57:36 -0700
commit3a573b5c601bae21aa6c9a4fd0716b27320f69c9 (patch)
tree00d6dda78832a5b8ebd1c5240fb8cabd84b70b0e /numpy/core/function_base.py
parente34d2a7b1e8d70d3fd99552dc77626add7a59e16 (diff)
downloadnumpy-3a573b5c601bae21aa6c9a4fd0716b27320f69c9.tar.gz
Apply suggestions from code review
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r--numpy/core/function_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py
index 178e6a26a..b5323fb17 100644
--- a/numpy/core/function_base.py
+++ b/numpy/core/function_base.py
@@ -143,7 +143,7 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None,
_mult_inplace = _nx.isscalar(delta)
step = delta / div
any_step_zero = (
- step == 0 if _mult_inplace else _nx.asarray(step == 0).any())
+ step == 0 if _mult_inplace else _nx.asanyarray(step == 0).any())
if any_step_zero:
# Special handling for denormal numbers, gh-5437
y /= div