'Return penalized negative loglikelihood function,
i.e., - sum (log pdf(x, theta), axis=0) + penalty
where theta are the parameters (including loc and scale)'

def _penalized_nnlf(self, theta, x):

    (loc, scale, args) = self._unpack_loc_scale(theta)
    if ((not self._argcheck(*args)) or (scale <= 0)):
        return inf
    x = asarray(((x - loc) / scale))
    n_log_scale = (len(x) * log(scale))
    return (self._nnlf_and_penalty(x, args) + n_log_scale)
