Skip to content
Snippets Groups Projects

Allow emcee to work with pre-release versions

Merged Matthew David Pitkin requested to merge matthew-pitkin/bilby:emcee_fix into master
1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
@@ -79,14 +79,16 @@ class Emcee(MCMCSampler):
function_kwargs['p0'] = self.pos0
if LooseVersion(emcee.__version__) > LooseVersion('2.2.1'):
for key in updatekeys:
function_kwargs[updatekeys[key]] = function_kwargs.pop(key)
if function_kwargs['mh_proposal'] is not None:
logger.warning("The 'mh_proposal' option is no longer used "
"in emcee v{}, and will be ignored.".format(emcee.__version__))
del function_kwargs['mh_proposal']
for key in updatekeys:
if updatekeys[key] not in function_kwargs:
function_kwargs[updatekeys[key]] = function_kwargs.pop(key)
else:
del function_kwargs[key]
return function_kwargs
Loading