Skip to content
Snippets Groups Projects
Commit c6791711 authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixup

parent fc815ff3
No related branches found
No related tags found
2 merge requests!411Gig energy,!410Simplifications
Pipeline #70287 passed
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment