summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-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