Skip to content

Commit 3a3c75a

Browse files
committed
bug: fix bug when applying power of Op to CuPy arrays
1 parent aa82309 commit 3a3c75a

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)