diff --git a/quimb/linalg/slepc_linalg.py b/quimb/linalg/slepc_linalg.py index fde35dac..07d4acd0 100644 --- a/quimb/linalg/slepc_linalg.py +++ b/quimb/linalg/slepc_linalg.py @@ -85,11 +85,15 @@ def __init__(self, lo): self.lo = lo self.real = lo.dtype in (float, np.float64) - def mult(self, _, x, y): - y[:] = self.lo.matvec(x) - - def multHermitian(self, _, x, y): - y[:] = self.lo.rmatvec(x) + def mult(self, _, xvec, yvec): + x = xvec.getArray(readonly=True) + y = self.lo.matvec(x) + yvec.setArray(y) + + def multHermitian(self, _, xvec, yvec): + x = xvec.getArray(readonly=True) + y = self.lo.rmatvec(x) + yvec.setArray(y) def linear_operator_2_petsc_shell(lo, comm=None):