mlx.core.linspace

目錄

mlx.core.linspace#

linspace(start: scalar, stop: scalar, num: int | None = 50, dtype: Dtype | None = float32, stream: None | Stream | Device = None) array#

Generate num evenly spaced numbers over interval [start, stop].

參數:
  • start (scalar) -- Starting value.

  • stop (scalar) -- Stopping value.

  • num (int, optional) -- Number of samples, defaults to 50.

  • dtype (Dtype, optional) -- Specifies the data type of the output, default to float32.

回傳:

The range of values.

回傳型別:

array