We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7efc8a commit 5501485Copy full SHA for 5501485
src/sample.jl
@@ -81,8 +81,8 @@ function mcmcsample(
81
callback(rng, model, sampler, transition, 1)
82
83
# Save the transition.
84
- transitions = AbstractMCMC.transitions(transition, model, sampler, N; kwargs...)
85
- transitions = save!!(transitions, transition, 1, model, sampler, N; kwargs...)
+ transitions = [transition]
+ Base.sizehint!(transitions, N)
86
87
# Update the progress bar.
88
progress && ProgressLogging.@logprogress 1/N
@@ -96,7 +96,9 @@ function mcmcsample(
96
callback(rng, model, sampler, transition, i)
97
98
99
- transitions = save!!(transitions, transition, i, model, sampler, N; kwargs...)
+ oldT = typeof(transitions)
100
+ transitions = save!!(transitions, transition, i, model, sampler)
101
+ oldT !== typeof(transitions) && Base.sizehint!(transitions, N)
102
103
104
progress && ProgressLogging.@logprogress i/N
0 commit comments