Skip to content

Commit

Permalink
Merge pull request #30 from btalamini/optimization/eliminate_copy_in_…
Browse files Browse the repository at this point in the history
…preconditioner

Avoid superfluous copy of residual vector when applying preconditioner
  • Loading branch information
ralberd authored Jul 27, 2022
2 parents 3639425 + d570816 commit 021accd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimism/SparseCholesky.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def update(self, new_stiffness_func):

def apply(self, b):
if type(b) == type(np.array([])):
b = onp.array(b)
b = onp.array(b, copy=False)
return self.Precond(b)


Expand Down

0 comments on commit 021accd

Please sign in to comment.