diff options
author | François Bissey <francois.bissey@canterbury.ac.nz> | 2015-11-11 21:02:08 +1300 |
---|---|---|
committer | François Bissey <francois.bissey@canterbury.ac.nz> | 2015-11-11 21:02:08 +1300 |
commit | 072e8a5572f0104c4b28828cb1404bed8682e951 (patch) | |
tree | 526d6367592a41e32def03e94718d7939cac3bed /numpy/core/function_base.py | |
parent | 4f8e93a3b26f15bb96d86ee05d672b51cda1e935 (diff) | |
download | numpy-072e8a5572f0104c4b28828cb1404bed8682e951.tar.gz |
Use asanyarray instead of asarray
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: |