summaryrefslogtreecommitdiff
path: root/numpy/core/function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r--numpy/core/function_base.py4
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))