diff --git a/nifty6/operators/energy_operators.py b/nifty6/operators/energy_operators.py index 597d66bab2f81f3bca0d31c7a788de45d6dfcfb7..7ffe9d807b4c856e0fcf7f04f9529ce10c7bdaf1 100644 --- a/nifty6/operators/energy_operators.py +++ b/nifty6/operators/energy_operators.py @@ -129,7 +129,7 @@ class VariableCovarianceGaussianEnergy(EnergyOperator): def apply(self, x): self._check_input(x) lin = isinstance(x, Linearization) - res0 = x[self._r].vdot(x[self._r]*x[self._icov]) + res0 = x[self._r].vdot(x[self._r]*x[self._icov]).real res1 = x[self._icov].log().sum() res = 0.5*(res0-res1) if not lin: