Arithmetic and comparison operators for MLX arrays
Examples
x <- mlx_matrix(1:4, 2, 2)
y <- mlx_matrix(5:8, 2, 2)
x + y
#> mlx array [2 x 2]
#> dtype: float32
#> device: gpu
#> values:
#> [,1] [,2]
#> [1,] 6 10
#> [2,] 8 12
x < y
#> mlx array [2 x 2]
#> dtype: bool
#> device: gpu
#> values:
#> [,1] [,2]
#> [1,] TRUE TRUE
#> [2,] TRUE TRUE