copapy.cho_solve#

copapy.cho_solve(c, b)#

Solve the linear system a x = b given the Cholesky factor c of a (a = c c^T, as returned by cholesky) by a forward and a back substitution. Like scipy.linalg.cho_solve((c, True), b).

Overloads:

For several systems with the same matrix (e.g. the steps of an optimization) the factorization is done once and only the substitutions are repeated.

Parameters:
  • c (Any) – Lower triangular Cholesky factor (2D tensor)

  • b (Any) – Right-hand side: a vector or 1D tensor with n elements or a 2D tensor with n rows (one system per column)

Returns:

a vector if b is a vector, otherwise a tensor

Return type:

Solution x with the shape of b