Skip to content
Snippets Groups Projects
Commit 7b8b275a authored by Colm Talbot's avatar Colm Talbot
Browse files

fix bug in get_random_draw_from_prior

parent 9bca41aa
No related branches found
No related tags found
No related merge requests found
...@@ -295,7 +295,8 @@ class Sampler(object): ...@@ -295,7 +295,8 @@ class Sampler(object):
with delta-function (or fixed) priors are not returned with delta-function (or fixed) priors are not returned
""" """
draw = np.array(list(self.priors.sample_subset(self.__search_parameter_keys).values())) new_sample = self.priors.sample()
draw = np.array(list(new_sample[key] for key in self.__search_parameter_keys))
if np.isinf(self.log_likelihood(draw)): if np.isinf(self.log_likelihood(draw)):
logging.warning('Prior draw {} has inf likelihood'.format(draw)) logging.warning('Prior draw {} has inf likelihood'.format(draw))
if np.isinf(self.log_prior(draw)): if np.isinf(self.log_prior(draw)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment