Log of the posterior density
        This is used to calculete acceptance probability for sampling.
    Inputs  :
        x   : 
            input value
        f_x : f(x), 
            function value at x
    Outputs : 
        log(p_x) : log[pi(x)]-||f(x)||^2/(2)
            log of the posterior probability

def _log_post(self,x,f_x):
        """
    Log of the posterior density
        This is used to calculete acceptance probability for sampling.
    Inputs  :
        x   : 
            input value
        f_x : f(x), 
            function value at x
    Outputs : 
        log(p_x) : log[pi(x)]-||f(x)||^2/(2)
            log of the posterior probability
        """
        # least squares part   -||f(x)||^2/2
        log_likelihood = (-la.norm(f_x)**2)/(2.)

        # prior part           -(x-m)'H(x-m)/2
        if self._prior: 
            m = self._m
            H = self._H
            log_prior = self._ln_H_-np.dot((x-m).T,np.dot(H,x-m))/2.
            return log_prior+log_likelihood
        else:
            return log_likelihood