From 7ecf9b8a5cd5a7deee79cec406e89781086efa80 Mon Sep 17 00:00:00 2001 From: Matthew Pitkin <matthew.pitkin@ligo.org> Date: Wed, 13 Mar 2019 11:59:18 +0000 Subject: [PATCH] Minor fixes --- bilby/core/prior.py | 5 +---- examples/other_examples/multivariate_gaussian_prior.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bilby/core/prior.py b/bilby/core/prior.py index d77ac9d63..c03aa8033 100644 --- a/bilby/core/prior.py +++ b/bilby/core/prior.py @@ -2395,7 +2395,6 @@ class MultivariateGaussian(Prior): """ # add parameter value to multivariate Gaussian - prevval = self.mvg.requested_parameters[self.name] # previous value self.mvg.requested_parameters[self.name] = val if self.mvg.filled_request(): @@ -2418,9 +2417,7 @@ class MultivariateGaussian(Prior): lnp = self.mvg.ln_prob(np.asarray(values).T) # reset the requested parameters - if prevval is not None: - if np.all(np.asarray(val) != np.asarray(prevval)): - self.mvg.reset_request() + self.mvg.reset_request() return lnp else: diff --git a/examples/other_examples/multivariate_gaussian_prior.py b/examples/other_examples/multivariate_gaussian_prior.py index b175a284e..e3f258c19 100644 --- a/examples/other_examples/multivariate_gaussian_prior.py +++ b/examples/other_examples/multivariate_gaussian_prior.py @@ -68,4 +68,4 @@ result = bilby.run_sampler( # result = bilby.run_sampler( # likelihood=likelihood, priors=priors, sampler='emcee', nsteps=1000, # nwalkers=200, nburn=500, outdir=outdir, label=label) -result.plot_corner() +result.plot_corner() \ No newline at end of file -- GitLab