diff options
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/function_base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 05fea557a..5070608b7 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -87,8 +87,10 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None): div = (num - 1) if endpoint else num # Convert float/complex array scalars to float, gh-3504 - start = start * 1. - stop = stop * 1. + # Make sure one can use variables that have an __array_interface__, gh-6634 + from numpy import asarray + start = asarray(start) * 1. + stop = asarray(stop) * 1. dt = result_type(start, stop, float(num)) if dtype is None: |