Skip to contents

Get the data type of an MLX array

Usage

mlx_dtype(x)

Arguments

x

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

Value

A data type string (see as_mlx() for possibilities).

Examples

x <- mlx_matrix(1:6, 2, 3)
mlx_dtype(x)
#> [1] "float32"