diff --git a/nifty6/operators/energy_operators.py b/nifty6/operators/energy_operators.py index 7ffe9d807b4c856e0fcf7f04f9529ce10c7bdaf1..a037c66bcf74a09fefac1d680740119690ea5300 100644 --- a/nifty6/operators/energy_operators.py +++ b/nifty6/operators/energy_operators.py @@ -133,7 +133,7 @@ class VariableCovarianceGaussianEnergy(EnergyOperator): res1 = x[self._icov].log().sum() res = 0.5*(res0-res1) if not lin: - return res + return Field.scalar(res) if not x.want_metric: return res mf = {self._r: x.val[self._icov], self._icov: .5*x.val[self._icov]**(-2)}