Skip to contents

Eigenvalues of Hermitian mlx arrays

Usage

mlx_eigvalsh(x, uplo = c("L", "U"))

Arguments

x

An mlx matrix (2-dimensional array).

uplo

Character string indicating which triangle to use ("L" or "U").

Value

An mlx array containing eigenvalues.

Examples

x <- as_mlx(matrix(c(2, 1, 1, 3), 2, 2))
mlx_eigvalsh(x)
#> mlx array [2]
#>   dtype: float32
#>   device: gpu
#>   values:
#> [1] 1.381966 3.618034