mlx.core.linalg.svd#
- svd(a: array, compute_uv: bool = True, *, stream: None | Stream | Device = None) Tuple[array, array, array]#
The Singular Value Decomposition (SVD) of the input matrix.
This function supports arrays with at least 2 dimensions. When the input has more than two dimensions, the function iterates over all indices of the first a.ndim - 2 dimensions and for each combination SVD is applied to the last two indices.
- Parameters:
- Returns:
If compute_uv is
Truereturns theU,S, andVtmatrices, such thatA = U @ diag(S) @ Vt. If compute_uv isFalsereturns singular values arrayS.- Return type: