mlx_degrees() and mlx_radians() mirror
mlx.core.degrees()
and mlx.core.radians(),
converting angular values elementwise using MLX kernels.
Examples
x <- as_mlx(pi / 2)
mlx_degrees(x) # 90
#> mlx array []
#> dtype: float32
#> device: gpu
#> values:
#> [1] 90
mlx_radians(mlx_vector(c(0, 90, 180)))
#> mlx array [3]
#> dtype: float32
#> device: gpu
#> values:
#> [1] 0.000000 1.570796 3.141593