diff options
author | Sankarshan Mudkavi <Sankarshan.Mudkavi@gmail.com> | 2014-02-20 19:12:24 -0500 |
---|---|---|
committer | Sankarshan Mudkavi <Sankarshan.Mudkavi@gmail.com> | 2014-02-25 15:58:12 -0500 |
commit | ba1e4df00d67e9fceec63a072e641942f98858e6 (patch) | |
tree | 306088d37878a35b93a5d66860865058c801f755 /numpy/core/function_base.py | |
parent | 3aaf365b34158ceca0f80cb42e64a7e362302214 (diff) | |
download | numpy-ba1e4df00d67e9fceec63a072e641942f98858e6.tar.gz |
BUG: Fixed issue 3504, and added tests for complex support
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r-- | numpy/core/function_base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 3396adf3d..6c0947cbf 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -79,6 +79,10 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None): """ num = int(num) + # Convert float/complex array scalars to float, gh-3504 + start = start + 0. + stop = stop + 0. + if dtype is None: dtype = result_type(start, stop, float(num)) |