Skip to content

Commit d8e419e

Browse files
authored
Merge pull request #107 from PyLops/patch-cgls
bug: fix issue in CGLS when using cupy arrays (needs to be forced to …
2 parents d05ebbb + aa71545 commit d8e419e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylops_mpi/optimization/cls_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def step(self, x: Union[DistributedArray, StackedDistributedArray],
373373
374374
"""
375375

376-
a = float(self.kold / (self.q.dot(self.q.conj()) + self.damp * self.c.dot(self.c.conj())))
376+
a = float(np.abs(self.kold / (self.q.dot(self.q.conj()) + self.damp * self.c.dot(self.c.conj()))))
377377
x += a * self.c
378378
self.s -= a * self.q
379379
damped_x = self.damp * x

0 commit comments

Comments
 (0)