Skip to content
Snippets Groups Projects
Commit 409dd851 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'add-catch-for-no-sampling-time' into 'master'

Add a check to make sure the sampling time exists before trying to update

See merge request !672
parents 88ecd92e bf501b17
No related branches found
No related tags found
No related merge requests found
......@@ -436,8 +436,9 @@ class Dynesty(NestedSampler):
logger.info("Writing checkpoint file {}".format(self.resume_file))
end_time = datetime.datetime.now()
self.sampling_time += end_time - self.start_time
self.start_time = end_time
if hasattr(self, 'start_time'):
self.sampling_time += end_time - self.start_time
self.start_time = end_time
current_state = dict(
unit_cube_samples=self.sampler.saved_u,
......
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