Make a prediction for the latent function values

def _raw_predict(self, Xnew, full_cov=False, kern=None):
        """
        Make a prediction for the latent function values
        """
        if kern is None:
            kern = self.kern

        # compute mean predictions
        Kmn = kern.K(Xnew, self.X)
        alpha_kron = self.posterior.alpha
        mu = np.dot(Kmn, alpha_kron)
        mu = mu.reshape(-1,1)

        # compute variance of predictions
        Knm = Kmn.T        
        noise = self.likelihood.variance
        V_kron = self.posterior.V_kron
        Qs = self.posterior.Qs
        QTs = self.posterior.QTs
        A = self.kron_mmprod(QTs, Knm)
        V_kron = V_kron.reshape(-1, 1)
        A = A / (V_kron + noise)
        A = self.kron_mmprod(Qs, A)

        Kmm = kern.K(Xnew)
        var = np.diag(Kmm - np.dot(Kmn, A)).copy()
        #var = np.zeros((Xnew.shape[0]))
        var = var.reshape(-1, 1)

        return mu, var