Skip to content

Commit

Permalink
Fixed #1691.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelClerx committed Dec 18, 2024
1 parent 0a077db commit 8db1e23
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pints/_mcmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,10 @@ def run(self):
if store_evaluations:
# If accepted, update log_pdf and prior for logging
if accepted:
current_logpdf[i] = fy
if self._needs_sensitivities:
current_logpdf[i] = fy[0]
else:
current_logpdf[i] = fy
if prior is not None:
current_prior[i] = prior(y)

Expand Down Expand Up @@ -820,7 +823,10 @@ def run(self):
# Check if accepted, if so, update log_pdf and
# prior to be logged
if accepted[i]:
current_logpdf[i] = fys[i]
if self._needs_sensitivities:
current_logpdf[i] = fys[i][0]
else:
current_logpdf[i] = fys[i]
if prior is not None:
current_prior[i] = prior(ys[i])

Expand Down

0 comments on commit 8db1e23

Please sign in to comment.