joshspeagle / dynesty

Dynamic Nested Sampling package for computing Bayesian posteriors and evidences
https://dynesty.readthedocs.io/
MIT License
358 stars 78 forks source link

`run_nested` method of `DynamicNestedSampler` throws error if `maxiter` hit before batching #84

Closed guillochon closed 6 years ago

guillochon commented 6 years ago

If the batching part of the run has not yet begun, run_nested throws the following error when maxiter is hit:

Traceback (most recent call last):
  File "/.../dynesty-0.9.1-py3.6.egg/dynesty/dynamicsampler.py", line 1571, in run_nested
UnboundLocalError: local variable 'logl_bounds' referenced before assignment
joshspeagle commented 6 years ago

Great catch -- I hadn't tested this edge case since making the clean-up changes in line with @bacook17's commit. I'll try to patch this over the weekend. (Just one more reason to get CI up and running at some point soon...)

joshspeagle commented 6 years ago

Fixed in 4f36b55e419a2bfb532707cef413f4fdfcc2cbce.