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§
- Norm
Options - 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_
device Deprecated - Compatibility shim for
cholesky. - cholesky_
inv - Compute the inverse of a real symmetric positive semi-definite matrix using it’s Cholesky decomposition.
- cholesky_
inv_ device Deprecated - Compatibility shim for
cholesky_inv. - cross
- Compute the cross product of two arrays along a specified axis.
- cross_
device Deprecated - Compatibility shim for
cross. - det
- Compute the determinant of square matrices.
- eig
- Compute the eigenvalues and eigenvectors of a square matrix.
- eig_
device Deprecated - Compatibility shim for
eig. - eigh
- Compute the eigenvalues and eigenvectors of a complex Hermitian or real symmetric matrix.
- eigh_
device Deprecated - Compatibility shim for
eigh. - eigvals
- Compute the eigenvalues of a square matrix.
- eigvals_
device Deprecated - Compatibility shim for
eigvals. - eigvalsh
- Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
- eigvalsh_
device Deprecated - Compatibility shim for
eigvalsh. - inv
- Compute the inverse of a square matrix. Returns an error if the input is not valid.
- inv_
device Deprecated - Compatibility shim for
inv. - lu
- Compute the LU factorization of the given matrix A.
- lu_
device Deprecated - Compatibility shim for
lu. - lu_
factor - Computes a compact representation of the LU factorization.
- lu_
factor_ device Deprecated - Compatibility shim for
lu_factor. - norm
- Compute p-norm of an
Array - norm_
device Deprecated - Compatibility shim for
norm. - norm_l2
- Compute the L2 norm of an
Array - norm_
l2_ device Deprecated - Compatibility shim for
norm_l2. - norm_
matrix - Matrix or vector norm.
- norm_
matrix_ device Deprecated - Compatibility shim for
norm_matrix. - pinv
- Compute the (Moore-Penrose) pseudo-inverse of a matrix.
- pinv_
device Deprecated - Compatibility shim for
pinv. - qr
- The QR factorization of the input matrix. Returns an error if the input is not valid.
- qr_
device Deprecated - 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_
device Deprecated - Compatibility shim for
solve. - solve_
triangular - Computes the solution of a triangular system of linear equations
AX = B - solve_
triangular_ device Deprecated - 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_
device Deprecated - Compatibility shim for
svd. - tri_inv
- Compute the inverse of a triangular square matrix.
- tri_
inv_ device Deprecated - Compatibility shim for
tri_inv.