prev_beta.copy_(beta_tridiag)
// Un-normalize
result.mul_(rhs_norm)
if not tolerance_reached and n_iter > 0:
warnings.warn(
"CG terminated in {} iterations with average residual norm {}"
After Change
prev_beta.copy_(beta_tridiag)
// Un-normalize
result = result.mul(rhs_norm)
if not tolerance_reached and n_iter > 0:
warnings.warn(
"CG terminated in {} iterations with average residual norm {}"