mlx.core.linspace#
- linspace(start: scalar, stop: scalar, num: int | None = 50, endpoint: bool = True, dtype: Dtype | None = float32, stream: StreamOrDevice = None) array#
Generate
numevenly spaced numbers over interval[start, stop].- 參數:
start (scalar) -- Starting value.
stop (scalar) -- Stopping value.
num (int, optional) -- Number of samples, defaults to
50.endpoint (bool, optional) -- If
True,stopis the last sample. Otherwise it is not included and the samples are spaced over the half-open interval[start, stop). Default:True.dtype (Dtype, optional) -- Specifies the data type of the output, default to
float32.
- 回傳值:
The range of values.
- 回傳值型別: