diff options
author | Ben Nathanson <github@bigriver.xyz> | 2020-06-12 15:36:26 -0400 |
---|---|---|
committer | Ben Nathanson <github@bigriver.xyz> | 2020-06-12 15:36:26 -0400 |
commit | e84f49e62d9d951af13a08fc103ef90bae368f6f (patch) | |
tree | 28a357c302f253acbea111ec93978bf5e752a01e /numpy/core/function_base.py | |
parent | 5345c2575a28fa2dfbbec83c99636669476c2745 (diff) | |
download | numpy-e84f49e62d9d951af13a08fc103ef90bae368f6f.tar.gz |
DOC: Clarify dtype default for logspace and geomspace
Same clarification for these functions as gh-16433
made for linspace. @Qiyu8 spotted these additional cases.
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r-- | numpy/core/function_base.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 4b5c307fd..f57e95742 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -53,9 +53,9 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, between samples. dtype : dtype, optional 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. + 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 @@ -204,8 +204,10 @@ def logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None, ``ln(samples) / ln(base)`` (or ``log_base(samples)``) is uniform. Default is 10.0. dtype : dtype - 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 type will never be + an integer; `float` is chosen even if the arguments would produce an + array of integers. axis : int, optional The axis in the result to store the samples. Relevant only if start or stop are array-like. By default (0), the samples will be along a @@ -299,8 +301,10 @@ def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): If true, `stop` is the last sample. Otherwise, it is not included. Default is True. dtype : dtype - 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. axis : int, optional The axis in the result to store the samples. Relevant only if start or stop are array-like. By default (0), the samples will be along a |