From 710f3da1571d55327322d19e64b1c3efcc49e21e Mon Sep 17 00:00:00 2001 From: alberto Date: Mon, 13 Apr 2026 11:53:52 +0200 Subject: [PATCH] Match order with pseudocode. --- src/afgl/util/lanczos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afgl/util/lanczos.py b/src/afgl/util/lanczos.py index 01c1f44..5dcc323 100644 --- a/src/afgl/util/lanczos.py +++ b/src/afgl/util/lanczos.py @@ -31,9 +31,9 @@ def lanczos(L, s, M): w = L @ V[:, j] alp[j] = np.dot(V[:, j], w) - w = w - V[:, j] * alp[j] + w = w - alp[j] * V[:, j] if j > 0: - w = w - V[:, j - 1] * beta[j - 1] + w = w - beta[j - 1] * V[:, j - 1] if j < M - 1: beta[j] = LA.norm(w)