spectrochempy.logspace
- logspace(cls, start, stop, num=50, endpoint=True, base=10.0, dtype=None, **kwargs)[source]
Return numbers spaced evenly on a log scale.
In linear space, the sequence starts at
base ** start
(base
to the power ofstart
) and ends withbase ** stop
(seeendpoint
below).- Parameters:
start (array_like) –
base ** start
is the starting value of the sequence.stop (array_like) –
base ** stop
is the final value of the sequence, unlessendpoint
is False. In that case,num + 1
values are spaced over the interval in log-space, of which all but the last (a sequence of lengthnum
) are returned.num (int, optional) – Number of samples to generate. Default is 50.
endpoint (bool, optional) – If true,
stop
is the last sample. Otherwise, it is not included. Default is True.base (float, optional) – The base of the log space. The step size between the elements in
ln(samples) / ln(base)
(orlog_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.**kwargs – Keywords argument used when creating the returned object, such as units, name, title, …
- Returns:
logspace –
num
samples, equally spaced on a log scale.
See also
arange
Similar to linspace, with the step size specified instead of the number of samples. Note that, when used with a float endpoint, the endpoint may or may not be included.
linspace
Similar to logspace, but with the samples uniformly distributed in linear space, instead of log space.
geomspace
Similar to logspace, but with endpoints specified directly.