get_factor

CholeskyFactor.get_factor(kind=None, lower=None)[source]

Return a copy of the Cholesky factor in the specified format.

Parameters:
  • kind (None or str in {‘LL’, ‘LDL’}, optional) – The type of factor to return. If LL, return the Cholesky factor L such that \(L L^{\top} = P A P^{\top}\). If LDL, return the combined LD factor such that \(L D L^{\top} = P A P^{\top}\). Default is None, which uses the kind with which factorize was called.

  • lower (None or bool, optional) – If True, return the lower triangular factor L. If False, return the upper triangular factor R. If None (default), return the factor in the same triangular form as it was created with factorize.

Returns:

  • L (csc_array) – The Cholesky factor in Compressed Sparse Column (CSC) format.

  • D (diags_array, optional) – If kind="LDL", also returns the D factor.