def log_prior(self):
        """evaluate the prior"""
        if self.priors.size == 0:
            return 0.
        x = self.param_array
        #evaluate the prior log densities
        log_p = reduce(lambda a, b: a + b, (p.lnpdf(x[ind]).sum() for p, ind in self.priors.items()), 0)

        #account for the transformation by evaluating the log Jacobian (where things are transformed)
        log_j = 0.
        priored_indexes = np.hstack([i for p, i in self.priors.items()])
        for c,j in self.constraints.items():
            if not isinstance(c, Transformation):continue
            for jj in j:
                if jj in priored_indexes:
                    log_j += c.log_jacobian(x[jj])
        return log_p + log_j