Commit c6791711 authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixup

parent fc815ff3
Pipeline #70287 passed with stages
in 15 minutes and 24 seconds
......@@ -138,7 +138,7 @@ class VariableCovarianceGaussianEnergy(EnergyOperator):
return res
mf = {self._r: x.val[self._icov], self._icov: .5*x.val[self._icov]**(-2)}
metric = makeOp(MultiField.from_dict(mf))
return res.add_metric(SandwichOperator(x.jac, metric))
return res.add_metric(SandwichOperator.make(x.jac, metric))
class GaussianEnergy(EnergyOperator):
......
......@@ -48,6 +48,7 @@ def test_variablecovariancegaussian(field):
mf = ift.MultiField.from_dict(dc)
energy = ift.VariableCovarianceGaussianEnergy(field.domain, 'a', 'b')
ift.extra.check_jacobian_consistency(energy, mf, tol=1e-6)
energy(ift.Linearization.make_var(mf, want_metric=True)).metric.draw_sample()
def test_gaussian(field):
......
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