Skip to contents

Elementwise minimum of two mlx arrays

Usage

mlx_minimum(x, y)

Arguments

x, y

mlx arrays or objects coercible with as_mlx().

Value

An mlx array containing the elementwise minimum.

See also

Examples

a <- mlx_matrix(1:4, 2, 2)
b <- as_mlx(matrix(c(4, 3, 2, 1), 2, 2))
mlx_minimum(a, b)
#> mlx array [2 x 2]
#>   dtype: float32
#>   device: gpu
#>   values:
#>      [,1] [,2]
#> [1,]    1    2
#> [2,]    2    1