Open tvercaut opened 8 years ago
Quick and dirty python implementation:
def lsmr_with_init(A,b,x0):
r0 = b - scipy.sparse.linalg.aslinearoperator(A).matvec(x0)
deltax_pack = scipy.sparse.linalg.lsmr(A,r0)
return x0 + deltax_pack[0]
Note however that it makes it more difficult to handle both initialisation and damping.
As per the lsmr documentation: