From d04ece1800d286f292f74eca35988414537809e1 Mon Sep 17 00:00:00 2001 From: Kipton Barros Date: Mon, 6 Jan 2025 16:53:57 -0700 Subject: [PATCH] Reference Lanczos doesn't overwrite v --- src/KPM/Lanczos.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KPM/Lanczos.jl b/src/KPM/Lanczos.jl index 58412dc35..b7f3130ff 100644 --- a/src/KPM/Lanczos.jl +++ b/src/KPM/Lanczos.jl @@ -93,6 +93,7 @@ function lanczos(mulA!, mulS!, v; min_iters, resolution=Inf, lhs=zeros(length(v) βs = Float64[] lhs_adj_Q = Vector{ComplexF64}[] + v = copy(v) vp = zero(v) Sv = zero(v) Svp = zero(v)