From 68ebc2bad1ad6a99e9939eff205a1a6d936cf4fd Mon Sep 17 00:00:00 2001 From: bjnath Date: Wed, 10 Jun 2020 17:27:13 -0400 Subject: DOC: Fix description of dtype default in linspace (#16433) DOC: Fix description of dtype default in linspace Clarify that inferred type will never be integer. Fixes gh-8597. --- numpy/core/function_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'numpy/core/function_base.py') diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 946e255c1..4b5c307fd 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -52,8 +52,10 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, If True, return (`samples`, `step`), where `step` is the spacing between samples. dtype : dtype, optional - The type of the output array. If `dtype` is not given, infer the data - type from the other input arguments. + The type of the output array. If `dtype` is not given, the data type + is inferred from `start` and `stop`. The inferred dtype will + never be an integer; `float` is chosen even if the arguments would + produce an array of integers. .. versionadded:: 1.9.0 -- cgit v1.2.1