Skip to content

Commit

Permalink
numsamples_perwalker
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Jan 27, 2024
1 parent 20cc1db commit a0f9cd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AffineInvariantMCMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function sample(llhood::Function, numwalkers::Integer, x0::AbstractMatrix{<:Real
chain, llhoodvals = JLD2.load(filename, "chain", "llhoods")
end
x = copy(x0)
if numsamples_perwalker < 2
numsamples_perwalker = 2
end
chain = Array{Float64}(undef, size(x0, 1), numwalkers, div(numsamples_perwalker, thinning))
lastllhoodvals = RobustPmap.rpmap(llhood, map(i->x[:, i], 1:size(x, 2)))
llhoodvals = Array{Float64}(undef, numwalkers, div(numsamples_perwalker, thinning))
Expand Down

0 comments on commit a0f9cd9

Please sign in to comment.