Skip to content

Commit 3b4f6db

Browse files
torfjeldedevmotion
andauthored
Apply suggestions from code review
Co-authored-by: David Widmann <[email protected]>
1 parent 44c55bb commit 3b4f6db

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sample.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ function mcmcsample(
224224
# Save the sample.
225225
samples = save!!(samples, sample, i, model, sampler, N; kwargs...)
226226

227-
# Increment iteration counter.
228-
i += 1
229-
230227
# Update the progress bar.
231228
if progress && (itotal += 1) >= next_update
232229
ProgressLogging.@logprogress itotal / Ntotal
@@ -296,7 +293,7 @@ function mcmcsample(
296293
# Discard initial samples.
297294
for j in 1:discard_initial
298295
# Obtain the next sample and state.
299-
sample, state = if j discard_from_warmup
296+
sample, state = if j num_warmup
300297
step_warmup(rng, model, sampler, state; kwargs...)
301298
else
302299
step(rng, model, sampler, state; kwargs...)

0 commit comments

Comments
 (0)