From 3a3c75abfcc7472a3c0c5c3940d7b5259be49843 Mon Sep 17 00:00:00 2001 From: mrava87 Date: Sun, 3 Aug 2025 22:06:59 +0100 Subject: [PATCH] bug: fix bug when applying power of Op to CuPy arrays --- pylops/linearoperator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylops/linearoperator.py b/pylops/linearoperator.py index ce1b0202b..020b77313 100644 --- a/pylops/linearoperator.py +++ b/pylops/linearoperator.py @@ -1474,7 +1474,7 @@ def __init__(self, A: LinearOperator, p: int) -> None: self.args = (A, p) def _power(self, fun: Callable, x: NDArray) -> NDArray: - res = np.array(x, copy=True) + res = x.copy() for _ in range(self.args[1]): res = fun(res) return res