summaryrefslogtreecommitdiff
path: root/numpy/core/function_base.py
diff options
context:
space:
mode:
authorbjnath <github@bigriver.xyz>2020-06-10 17:27:13 -0400
committerGitHub <noreply@github.com>2020-06-10 14:27:13 -0700
commit68ebc2bad1ad6a99e9939eff205a1a6d936cf4fd (patch)
tree6f913b07e724f6dd4ab202bc046d79b8713b51a2 /numpy/core/function_base.py
parent0ac02d3819157a9c64b78157428336200632cff8 (diff)
downloadnumpy-68ebc2bad1ad6a99e9939eff205a1a6d936cf4fd.tar.gz
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.
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r--numpy/core/function_base.py6
1 files changed, 4 insertions, 2 deletions
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