From e9aebbaee91442e548a968f3abaa805a0fc3f820 Mon Sep 17 00:00:00 2001 From: Chon Lok Lei Date: Tue, 7 Nov 2023 23:22:12 +0800 Subject: [PATCH] Update _twisted_gaussian_banana.py --- pints/toy/_twisted_gaussian_banana.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pints/toy/_twisted_gaussian_banana.py b/pints/toy/_twisted_gaussian_banana.py index 72544ecb7..456530c7a 100644 --- a/pints/toy/_twisted_gaussian_banana.py +++ b/pints/toy/_twisted_gaussian_banana.py @@ -63,10 +63,9 @@ def __init__(self, dimension=10, b=0.1, V=100): np.zeros(self._n_parameters), self._sigma) def __call__(self, x): - y = np.array(x, copy=True, dtype='float') + y = np.array(x, copy=True, dtype='float').reshape(self._n_parameters) y[0] = float(y[0]) / np.sqrt(self._V) y[1] += self._b * ((x[0] ** 2) - self._V) - y = y.reshape(self._n_parameters) return self._phi.logpdf(y) def distance(self, samples):