mlx_arange() mirrors base::seq() with mlx arrays: it creates evenly spaced values
starting at start (default 0), stepping by step (default 1), and stopping before stop.
Usage
mlx_arange(
stop,
start = NULL,
step = NULL,
dtype = c("float32", "float64", "int8", "int16", "int32", "int64", "uint8", "uint16",
"uint32", "uint64"),
device = mlx_default_device()
)Arguments
- stop
Exclusive upper bound.
- start
Optional starting value (defaults to 0).
- step
Optional step size (defaults to 1).
- dtype
MLX dtype (
"float32"or"float64").- device
Execution target: supply
"gpu","cpu", or anmlx_streamcreated viamlx_new_stream(). Defaults to the currentmlx_default_device()unless noted otherwise (helpers that act on an existing array typically reuse that array's device or stream).