mlx.core.linalg.cholesky#
- cholesky(a: array, upper: bool = False, *, stream: None | Stream | Device = None) array#
計算實對稱半正定矩陣的 Cholesky 分解。
This function supports arrays with at least 2 dimensions. When the input has more than two dimensions, the Cholesky decomposition is computed for each matrix in the last two dimensions of
a.If the input matrix is not symmetric positive semi-definite, behaviour is undefined.
- 參數:
- 回傳值:
If
upper = False, it returns a lower triangularLmatrix such thatL @ L.T = a. Ifupper = True, it returns an upper triangularUmatrix such thatU.T @ U = a.- 回傳值型別: