mlx_broadcast_to() mirrors mlx.core.broadcast_to(),
repeating singleton dimensions without copying data.
Value
An mlx array with the requested dimensions. Dimnames from matching or singleton broadcast axes are carried to the result.
Examples
x <- mlx_matrix(1:3, nrow = 1)
broadcast <- mlx_broadcast_to(x, c(5, 3))
dim(broadcast)
#> [1] 5 3