Skip to contents

S3 group generic for summary functions including sum(), prod(), min(), max(), all(), and any().

Usage

# S3 method for class 'mlx'
Summary(x, ..., na.rm = FALSE)

Arguments

x

mlx array or object coercible to mlx

...

Additional mlx arrays (for reducing multiple arrays), or named arguments axes (legacy axis) and drop

na.rm

Logical; currently ignored for mlx arrays (generates warning if TRUE)

Value

An mlx array with the summary result.

See also

Examples

x <- mlx_matrix(1:6, 2, 3)
sum(x)
#> mlx array []
#>   dtype: float32
#>   device: gpu
#>   values:
#> [1] 21
any(x > 3)
#> [1] TRUE
all(x > 0)
#> [1] TRUE