Skip to main content

Module linalg

Module linalg 

Source
Expand description

Linear algebra operations.

At this MLX pin, these operations are CPU-only; select the CPU stream by running them inside crate::with_stream with crate::Stream::cpu.

Structs§

NormOptions
Axis selection and independent defaults for norm operations.
SlogDet
The sign and natural logarithm of the absolute determinant.

Enums§

Ord
Order of the norm

Functions§

cholesky
Compute the Cholesky decomposition of a real symmetric positive semi-definite matrix.
cholesky_deviceDeprecated
Compatibility shim for cholesky.
cholesky_inv
Compute the inverse of a real symmetric positive semi-definite matrix using it’s Cholesky decomposition.
cholesky_inv_deviceDeprecated
Compatibility shim for cholesky_inv.
cross
Compute the cross product of two arrays along a specified axis.
cross_deviceDeprecated
Compatibility shim for cross.
det
Compute the determinant of square matrices.
eig
Compute the eigenvalues and eigenvectors of a square matrix.
eig_deviceDeprecated
Compatibility shim for eig.
eigh
Compute the eigenvalues and eigenvectors of a complex Hermitian or real symmetric matrix.
eigh_deviceDeprecated
Compatibility shim for eigh.
eigvals
Compute the eigenvalues of a square matrix.
eigvals_deviceDeprecated
Compatibility shim for eigvals.
eigvalsh
Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
eigvalsh_deviceDeprecated
Compatibility shim for eigvalsh.
inv
Compute the inverse of a square matrix. Returns an error if the input is not valid.
inv_deviceDeprecated
Compatibility shim for inv.
lu
Compute the LU factorization of the given matrix A.
lu_deviceDeprecated
Compatibility shim for lu.
lu_factor
Computes a compact representation of the LU factorization.
lu_factor_deviceDeprecated
Compatibility shim for lu_factor.
norm
Compute p-norm of an Array
norm_deviceDeprecated
Compatibility shim for norm.
norm_l2
Compute the L2 norm of an Array
norm_l2_deviceDeprecated
Compatibility shim for norm_l2.
norm_matrix
Matrix or vector norm.
norm_matrix_deviceDeprecated
Compatibility shim for norm_matrix.
pinv
Compute the (Moore-Penrose) pseudo-inverse of a matrix.
pinv_deviceDeprecated
Compatibility shim for pinv.
qr
The QR factorization of the input matrix. Returns an error if the input is not valid.
qr_deviceDeprecated
Compatibility shim for qr.
slogdet
Compute determinant sign and log absolute determinant for square matrices.
solve
Compute the solution to a system of linear equations AX = B
solve_deviceDeprecated
Compatibility shim for solve.
solve_triangular
Computes the solution of a triangular system of linear equations AX = B
solve_triangular_deviceDeprecated
Compatibility shim for solve_triangular.
svd
The Singular Value Decomposition (SVD) of the input matrix. Returns an error if the input is not valid.
svd_deviceDeprecated
Compatibility shim for svd.
tri_inv
Compute the inverse of a triangular square matrix.
tri_inv_deviceDeprecated
Compatibility shim for tri_inv.