Math operations for MLX arrays
Examples
x <- mlx_matrix(c(-1, 0, 1), 3, 1)
sin(x)
#> mlx array [3 x 1]
#> dtype: float32
#> device: gpu
#> values:
#> [,1]
#> [1,] -0.841471
#> [2,] 0.000000
#> [3,] 0.841471
round(x + 0.4)
#> mlx array [3 x 1]
#> dtype: float32
#> device: gpu
#> values:
#> [,1]
#> [1,] -1
#> [2,] 0
#> [3,] 1