Commit 96d52905 authored by Philipp Arras's avatar Philipp Arras
Browse files

Formatting

parent 3b24e3c7
Pipeline #67484 passed with stages
in 26 minutes and 1 second
......@@ -79,7 +79,7 @@ class MetricGaussianKL(Energy):
def __init__(self, mean, hamiltonian, n_samples, constants=[],
point_estimates=[], mirror_samples=False,
napprox=0, _samples=None, lh_sampling_dtype = np.float):
napprox=0, _samples=None, lh_sampling_dtype=np.float64):
super(MetricGaussianKL, self).__init__(mean)
if not isinstance(hamiltonian, StandardHamiltonian):
......@@ -101,7 +101,7 @@ class MetricGaussianKL(Energy):
if napprox > 1:
met._approximation = makeOp(approximation2endo(met, napprox))
_samples = tuple(met.draw_sample(from_inverse=True,
dtype = lh_sampling_dtype)
dtype=lh_sampling_dtype)
for _ in range(n_samples))
if mirror_samples:
_samples += tuple(-s for s in _samples)
......
......@@ -71,7 +71,7 @@ class SamplingEnabler(EndomorphicOperator):
else:
s = self._prior.draw_sample(from_inverse=True)
sp = self._prior(s)
nj = self._likelihood.draw_sample(dtype = dtype)
nj = self._likelihood.draw_sample(dtype=dtype)
energy = QuadraticEnergy(s, self._op, sp + nj,
_grad=self._likelihood(s) - nj)
inverter = ConjugateGradient(self._ic)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment