Skip to content

Commit

Permalink
Merge pull request #130 from sblunt/prior-check
Browse files Browse the repository at this point in the history
skip likelihood evaluation if prior is -inf
  • Loading branch information
semaphoreP committed Aug 5, 2019
2 parents e0f3260 + 26d35d4 commit d41b4d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions orbitize/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ def _logl(self, params, include_logp=False):
if include_logp:
if np.ndim(params) == 1:
logp = orbitize.priors.all_lnpriors(params, self.priors)
# escape if logp == -np.inf
if np.isinf(logp):
return -np.inf
else:
logp = np.array([orbitize.priors.all_lnpriors(pset, self.priors) for pset in params])
else:
Expand Down

0 comments on commit d41b4d7

Please sign in to comment.