Density function for blow and hop moves

def _g(self, h, xp, s):
        """Density function for blow and hop moves"""

        nphi = sum(self.phi)

        return (nphi / 2.0) * log(2 * pi) + nphi * \
            log(s) + 0.5 * sum((h - xp) ** 2) / (s ** 2)