Skip to content

Commit

Permalink
Update _twisted_gaussian_banana.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chonlei authored Nov 7, 2023
1 parent 84377fa commit e9aebba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pints/toy/_twisted_gaussian_banana.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e9aebba

Please sign in to comment.