Skip to content

Commit 514b33d

Browse files
authored
Correct the order of break (#157)
* fix order of break * increment version
1 parent 5053f77 commit 514b33d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "AdvancedHMC"
22
uuid = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d"
3-
version = "0.2.17"
3+
version = "0.2.18"
44

55
[deps]
66
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"

src/integrator.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ function step(
6666
r = temper(lf, r, (i=i, is_half=false), n_steps)
6767
# Create a new phase point by caching the logdensity and gradient
6868
z = phasepoint(h, θ, r; ℓπ=DualValue(value, gradient))
69-
!isfinite(z) && break
69+
# Update result
7070
if res isa Vector
7171
res[i] = z
7272
else
7373
res = z
7474
end
75+
!isfinite(z) && break
7576
end
7677
res
7778
end

0 commit comments

Comments
 (0)