Skip to content
Snippets Groups Projects
Commit 9fc0969f authored by Matthew Pitkin's avatar Matthew Pitkin
Browse files

sampler.py: fix bug

parent 58963dfc
No related branches found
No related tags found
1 merge request!139Add PyMC3 sampler
......@@ -1196,10 +1196,13 @@ class Pymc3(Sampler):
if distname in self.prior_map:
# check if we have a predefined PyMC3 distribution
if 'pymc3' in self.prior_map[distname] and 'argmap' in self.prior_map[distname] and distname in pymc3.__dict__:
if 'pymc3' in self.prior_map[distname] and 'argmap' in self.prior_map[distname]:
# check the required arguments for the PyMC3 distribution
pymc3distname = self.prior_map[distname]['pymc3']
if pymc3distname not in pymc3.__dict__:
raise ValueError("Prior '{}' is not a known PyMC3 distribution.".format(pymc3distname))
reqargs = inspect.getargspec(pymc3.__dict__[pymc3distname].__init__).args[1:]
# set keyword arguments
......
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