From f42628ce9fa6b754b87c94e912ccc84fcd8f6027 Mon Sep 17 00:00:00 2001 From: Matthew Pitkin <matthew.pitkin@ligo.org> Date: Tue, 3 Sep 2019 15:14:23 +0100 Subject: [PATCH] prior.py: fix for MultivariateGaussianDist - fix sampling from a multi-variate Gaussian dist in the case that the distribution is only for one parameter --- bilby/core/prior.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilby/core/prior.py b/bilby/core/prior.py index 9ea0b1934..5b64546ff 100644 --- a/bilby/core/prior.py +++ b/bilby/core/prior.py @@ -2922,7 +2922,7 @@ class MultivariateGaussianDist(object): # sample the multivariate Gaussian keys vals = np.random.uniform(0, 1, len(self)) - samp = self.rescale(vals, mode=mode) + samp = np.atleast_1d(self.rescale(vals, mode=mode)) samps[i, :] = samp # check sample is in bounds (otherwise perform another draw) -- GitLab