Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dfm/emcee
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Jun 25, 2018
2 parents 27e67bf + eff3404 commit c8854c4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions emcee/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,17 @@ def run_mcmc(self, initial_state, nsteps, **kwargs):
"""
if initial_state is None:
if self._previous_state is None:
raise ValueError("Cannot have pos0=None if run_mcmc has never "
"been called.")
raise ValueError(
"Cannot have `initial_state=None` if run_mcmc has never "
"been called."
)
initial_state = self._previous_state

results = None
for results in self.sample(initial_state, iterations=nsteps, **kwargs):
pass

# Store so that the ``pos0=None`` case will work
# Store so that the ``initial_state=None`` case will work
self._previous_state = results

return results
Expand Down

0 comments on commit c8854c4

Please sign in to comment.