Skip to content

Commit

Permalink
Merge pull request #107 from PyLops/patch-cgls
Browse files Browse the repository at this point in the history
bug: fix issue in CGLS when using cupy arrays (needs to be forced to …
  • Loading branch information
mrava87 authored Oct 2, 2024
2 parents d05ebbb + aa71545 commit d8e419e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylops_mpi/optimization/cls_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def step(self, x: Union[DistributedArray, StackedDistributedArray],
"""

a = float(self.kold / (self.q.dot(self.q.conj()) + self.damp * self.c.dot(self.c.conj())))
a = float(np.abs(self.kold / (self.q.dot(self.q.conj()) + self.damp * self.c.dot(self.c.conj()))))
x += a * self.c
self.s -= a * self.q
damped_x = self.damp * x
Expand Down

0 comments on commit d8e419e

Please sign in to comment.