Commit ad2f5497 authored by Colm Talbot's avatar Colm Talbot Committed by Gregory Ashton

Remove dynesty from __getstate__

parent 206f412b
......@@ -121,6 +121,12 @@ class Dynesty(NestedSampler):
signal.signal(signal.SIGINT, self.write_current_state_and_exit)
signal.signal(signal.SIGALRM, self.write_current_state_and_exit)
def __getstate__(self):
""" For pickle: remove external_sampler, which can be an unpicklable "module" """
state = self.__dict__.copy()
del state['external_sampler']
return state
def sampler_function_kwargs(self):
keys = ['dlogz', 'print_progress', 'print_func', 'maxiter',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment