Skip to content

Commit a6bcc3d

Browse files
committed
StackOverFlowError -> MethodError when calling metropolis_sample improperly
1 parent 3ce8115 commit a6bcc3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bayes/sampling.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ A convenience method. One step of the Metropolis algorithm is performed by calli
104104
- `bl_sampler`: Sampler used to drawn branchlengths from the posterior.
105105
"""
106106
function metropolis_sample(
107-
args...;
107+
initial_tree::FelNode,
108+
models::Vector{<:BranchModel},
109+
num_of_samples;
108110
bl_sampler::UnivariateSampler = BranchlengthSampler(Normal(0, 2), Normal(-1, 1)),
109111
kwargs...,
110112
)
111-
metropolis_sample(args...; kwargs...) do tree, models
113+
metropolis_sample(initial_tree, models, num_of_samples; kwargs...) do tree, models
112114
nni_update!(softmax_sampler, tree, x -> models)
113115
branchlength_update!(bl_sampler, tree, x -> models)
114116
end

0 commit comments

Comments
 (0)