Skip to content

Commit a94ea8e

Browse files
authored
Merge pull request #689 from mrava87/fix-power
bug: fix bug when applying power of Op to CuPy arrays
2 parents aa82309 + 3a3c75a commit a94ea8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pylops/linearoperator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ def __init__(self, A: LinearOperator, p: int) -> None:
14741474
self.args = (A, p)
14751475

14761476
def _power(self, fun: Callable, x: NDArray) -> NDArray:
1477-
res = np.array(x, copy=True)
1477+
res = x.copy()
14781478
for _ in range(self.args[1]):
14791479
res = fun(res)
14801480
return res

0 commit comments

Comments
 (0)