Skip to content
Snippets Groups Projects
Commit 7fe4c89a authored by Colm Talbot's avatar Colm Talbot Committed by Moritz Huebner
Browse files

Resolve "cpnest broken"

parent 797886f1
No related branches found
No related tags found
No related merge requests found
from __future__ import absolute_import
import numpy as np
from pandas import DataFrame
from ..utils import logger
......@@ -50,10 +51,9 @@ class Cpnest(Sampler):
self.__kwargs.update(kwargs)
def _run_external_sampler(self):
cpnest = self.external_sampler
import cpnest.model
from cpnest import model as cpmodel, CPNest
class Model(cpnest.model.Model):
class Model(cpmodel.Model):
""" A wrapper class to pass our log_likelihood into cpnest """
def __init__(self, names, bounds):
self.names = names
......@@ -79,7 +79,7 @@ class Cpnest(Sampler):
bounds = [[self.priors[key].minimum, self.priors[key].maximum]
for key in self.search_parameter_keys]
model = Model(self.search_parameter_keys, bounds)
out = cpnest.CPNest(model, output=self.outdir, **self.kwargs)
out = CPNest(model, output=self.outdir, **self.kwargs)
out.run()
if self.plot:
......
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