Skip to content

Commit e6e4136

Browse files
authored
Missing float(x) in CG (#25)
1 parent 91b1994 commit e6e4136

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/07_Iterative_methods.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,8 @@ A (non-optimised) CG implementation is:
13611361

13621362
# ╔═╡ 5291c5f3-7d79-42b4-b704-24697fcc9782
13631363
function conjugate_gradient_simple(A, b; x=zero(b), tol=1e-6, maxiter=100)
1364-
relnorms = Float64[] # Track relative residual norm
1365-
history = [x]
1364+
history = [float(x)] # History of iterates
1365+
relnorms = Float64[] # Track relative residual norm
13661366

13671367
r = b - A * x
13681368
p = r

0 commit comments

Comments
 (0)