Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
torfjelde and devmotion authored Oct 4, 2024
1 parent 44c55bb commit 3b4f6db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/sample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ function mcmcsample(
# Save the sample.
samples = save!!(samples, sample, i, model, sampler, N; kwargs...)

# Increment iteration counter.
i += 1

# Update the progress bar.
if progress && (itotal += 1) >= next_update
ProgressLogging.@logprogress itotal / Ntotal
Expand Down Expand Up @@ -296,7 +293,7 @@ function mcmcsample(
# Discard initial samples.
for j in 1:discard_initial
# Obtain the next sample and state.
sample, state = if j discard_from_warmup
sample, state = if j num_warmup
step_warmup(rng, model, sampler, state; kwargs...)
else
step(rng, model, sampler, state; kwargs...)
Expand Down

0 comments on commit 3b4f6db

Please sign in to comment.