Skip to content

Commit 021accd

Browse files
authored
Merge pull request #30 from btalamini/optimization/eliminate_copy_in_preconditioner
Avoid superfluous copy of residual vector when applying preconditioner
2 parents 3639425 + d570816 commit 021accd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimism/SparseCholesky.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def update(self, new_stiffness_func):
5151

5252
def apply(self, b):
5353
if type(b) == type(np.array([])):
54-
b = onp.array(b)
54+
b = onp.array(b, copy=False)
5555
return self.Precond(b)
5656

5757

0 commit comments

Comments
 (0)