Stack mlx arrays along a new axis
Arguments
- ...
One or more arrays (or a single list of arrays) coercible via
as_mlx().- axis
Position of the new axis (1-indexed). Supply values between 1 and
length(mlx_shape(x)) + 1to insert anywhere along the dimension list.
Examples
x <- mlx_matrix(1:4, 2, 2)
y <- mlx_matrix(5:8, 2, 2)
stacked <- mlx_stack(x, y, axis = 1)