def loglkl(self, cosmo, data):

        # define array for difference between theory and observations
        difference = np.ndarray(self.num_points, 'float64')

        # for each point, compute luminosity distance d_L=(1+z)**2d_A and infer
        # theoretical prediction and difference with observation
        for i in range(self.num_points):
            d = cosmo.angular_distance(self.z[i])
            difference[i] = 5 * np.log((1 + self.z[i]) ** 2 * d) / np.log(
                10) + self.moduli[i] - 25

        # chisquare before analytic marginalization
        AT = np.dot(difference, np.dot(self.inv_covmat, difference))

        # correct chi square with effect of analytic marginalization
        if self.has_marginalization:
            BT = np.sum(np.dot(self.inv_covmat, difference))
        else:
            BT = 0

        # final chi square
        chi_squared = AT - (BT ** 2) / self.inv_covmat_sum

        # return ln(L)
        lkl = - 0.5 * chi_squared

        return lkl
dataset/ETHPy150Open baudren/montepython_public/montepython/likelihoods/sn/__init__.py/sn.loglkl/swapped operands of `-`