A : {matrix, sparse matrix, ndarray, LinearOperator}
Matrix A in the linear system.
b : (m,) ndarray
Vector b in the linear system.
damp : float
Damping factor for regularized leastsquares. lsmr solves
the regularized leastsquares problem:
min (b)  ( A )x
(0) (damp*I) _2
where damp is a scalar. If damp is None or 0, the system
is solved without regularization.
atol, btol : float
Stopping tolerances. lsmr continues iterations until a
certain backward error estimate is smaller than some quantity
depending on atol and btol. Let r = b  Ax be the
residual vector for the current approximate solution x.
If Ax = b seems to be consistent, lsmr terminates
when norm(r) <= atol * norm(A) * norm(x) + btol * norm(b).
Otherwise, lsmr terminates when norm(A^{T} r) <=
atol * norm(A) * norm(r). If both tolerances are 1.0e6 (say),
the final norm(r) should be accurate to about 6
digits. (The final x will usually have fewer correct digits,
depending on cond(A) and the size of LAMBDA.) If atol
or btol is None, a default value of 1.0e6 will be used.
Ideally, they should be estimates of the relative error in the
entries of A and B respectively. For example, if the entries
of A have 7 correct digits, set atol = 1e7. This prevents
the algorithm from doing unnecessary work beyond the
uncertainty of the input data.
conlim : float
lsmr terminates if an estimate of cond(A) exceeds
conlim. For compatible systems Ax = b, conlim could be
as large as 1.0e+12 (say). For leastsquares problems,
conlim should be less than 1.0e+8. If conlim is None, the
default value is 1e+8. Maximum precision can be obtained by
setting atol = btol = conlim = 0, but the number of
iterations may then be excessive.
maxiter : int
lsmr terminates if the number of iterations reaches
maxiter. The default is maxiter = min(m, n). For
illconditioned systems, a larger value of maxiter may be
needed.
show : bool
Print iterations logs if show=True.
