Skip to content

Commit

Permalink
Adds bug fix for nested sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPaulSharp committed Aug 19, 2024
1 parent feb0c6d commit a9b8c71
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion minimisers/NS/nestedSampler.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@
% initialise array of samples for posterior
nest_samples = zeros(1,D+1);
coder.varsize('nest_samples',[1e5 50],[1 1]);


% check certain values are positive integers or zero
if mod(nMCMC, 1) ~= 0 || nMCMC < 0
error('Error... nMCMC must be an integer >= 0')
end

if mod(nLive, 1) ~= 0 || nLive < 0
error('Error... nLive must be an integer >= 0')
end

% draw the set of initial live points from the prior
livepoints = zeros(nLive, D);

Expand Down

0 comments on commit a9b8c71

Please sign in to comment.