Make sure IPFCramSolver.__call__ doesn't modify n0

This commit is contained in:
Paul Romano 2020-06-05 21:18:46 -05:00
parent 506d3e610d
commit 36e316bb2c

View file

@ -76,7 +76,7 @@ class IPFCramSolver(DepSystemSolver):
"""
A = sp.csr_matrix(A * dt, dtype=np.float64)
y = np.asarray(n0, dtype=np.float64)
y = n0.copy()
ident = sp.eye(A.shape[0])
for alpha, theta in zip(self.alpha, self.theta):
y += 2*np.real(alpha*sla.spsolve(A - theta*ident, y))