diff options
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r-- | numpy/core/function_base.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 5070608b7..0e2bdc693 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function __all__ = ['logspace', 'linspace', 'may_share_memory'] from . import numeric as _nx -from .numeric import result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError +from .numeric import result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError, asanyarray def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None): @@ -88,9 +88,8 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None): # Convert float/complex array scalars to float, gh-3504 # 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. + start = asanyarray(start) * 1. + stop = asanyarray(stop) * 1. dt = result_type(start, stop, float(num)) if dtype is None: |