def expected_log_W(self):
        """
        Compute the expected log W under the variational approximation
        """
        p_A = self.expected_A()
        E_ln_W =  p_A * self.expected_log_W_given_A(1.0) + \
               (p_A-1) * self.expected_log_W_given_A(0.0)

        if not self.network.allow_self_connections:
            np.fill_diagonal(E_ln_W, -np.inf)

        return E_ln_W
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/internals/weights.py/GammaMixtureWeights.expected_log_W/swapped operands of `-`