Skip to contents

Get dimensions of MLX array

Usage

# S3 method for class 'mlx'
dim(x)

Arguments

x

An mlx array, or an R array/matrix/vector that will be converted via as_mlx().

Value

Integer vector of dimensions

Examples

x <- as_mlx(matrix(1:4, 2, 2))
dim(x)
#> [1] 2 2