diff options
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r-- | numpy/core/function_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 34818e334..7a2b350a4 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -162,7 +162,7 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, y = _nx.moveaxis(y, 0, axis) if _nx.issubdtype(dtype, np.integer): - y[y<0] = _nx.floor(y[y<0]) + _nx.floor(y, out=y) if retstep: return y.astype(dtype, copy=False), step |