Returns the log of the pdf at the given values. The keyword
        arguments must contain all of parameters in self's params. Unrecognized
        arguments are ignored.
11793
def _logpdf(self, **kwargs):
        
        if kwargs in self:
            return numpy.log(self._pdf(**kwargs))
        else:
            return -numpy.inf
940573
public static double logpdf(double val, int v) {
    return GammaDistribution.logGamma((v + 1) * .5) - GammaDistribution.logGamma(v * .5) //
        - .5 * FastMath.log(v * Math.PI) + FastMath.log1p(val * val / v) * -.5 * (v + 1);
  }
75055
def pdf(self, x_test):
		
		N,D = self.data.shape
		x_test = np.asfortranarray(x_test)
		x_test = x_test.reshape([-1, D])
		
		pdfs = self._individual_pdfs(x_test)
		#import pdb; pdb.set_trace()
		# combine values based on fully_dimensional!
		if self.fully_dimensional:
			# first the product of the individual pdfs for each point in the data across dimensions and then the average (factorized kernel)
			pdfs = np.sum(np.prod(pdfs, axis=-1)*self.weights[None, :], axis=-1)
		else:
			# first the average over the 1d pdfs and the the product over dimensions (TPE like factorization of the pdf)
			pdfs = np.prod(np.sum(pdfs*self.weights[None,:,None], axis=-2), axis=-1)
		return(pdfs)
837308
def log(fn):
    

    def func(*args, **kwargs):
        arg_string = ""
        for i in range(0, len(args)):
            var_name = fn.__code__.co_varnames[i]
            if var_name != "self":
                arg_string += var_name + ":" + str(args[i]) + ","
        arg_string = arg_string[0:len(arg_string) - 1]
        string = (RED + BOLD + '>> ' + END + 'Calling {0}({1})'.format(fn.__code__.co_name, arg_string))
        if len(kwargs):
            string = (RED + BOLD + '>> ' + END + 'Calling {0} with args {1} and kwargs {2}'.format(fn.__code__.co_name,
                                                                                                   arg_string, kwargs))
        print(string)
        result = fn(*args, **kwargs)
        string = BLUE + BOLD + '<< ' + END + 'Return {0} with result :{1}'.format(fn.__code__.co_name, result)
        print(string)
        return result

    return func
717962
def logpdf(self, mu):
        
        if self.transform is not None:
            mu = self.transform(mu)     
        return ss.cauchy.logpdf(mu, self.loc0, self.scale0)
546408
def _pdf(self, phi):
        
        pdf = np.inner(self._vn, np.cos(np.outer(phi, self._n)))
        pdf *= 2.
        pdf += 1.

        return pdf
1074087
def get_pdf_response(self, context, **response_kwargs):
        
        return render_to_pdf_response(
            request=self.request,
            template=self.get_template_names(),
            context=context,
            using=self.template_engine,
            filename=self.get_pdf_filename(),
            **self.get_pdf_kwargs()
        )
1281840
def pdf(self, mu):
        
        if self.transform is not None:
            mu = self.transform(mu)    
        return self.pdf_internal(mu, df=self.df0, loc=self.loc0, scale=self.scale0, gamma=self.gamma0)
1239724
def _pdf(self, **kwargs):
        
        if kwargs in self:
            vals = numpy.array([numpy.log(10) * self._norm * kwargs[param]
                                for param in kwargs.keys()])
            return 1.0 / numpy.prod(vals)
        else:
            return 0.
169074
def log(msg, *args, **kwargs):
    
    if len(args) == 0 and len(kwargs) == 0:
        print(msg)
    else:
        print(msg.format(*args, **kwargs))
1297083
public static double logpdf(double val, double shape, double location, double scale) {
    if(val < location) {
      return Double.NEGATIVE_INFINITY;
    }
    val = (val - location) / scale;
    final double lval = FastMath.log(val);
    if(lval == Double.POSITIVE_INFINITY) {
      return Double.NEGATIVE_INFINITY;
    }
    return FastMath.log(shape / scale) + (shape - 1.) * lval //
        - 2. * FastMath.log1p(FastMath.exp(lval * shape));
  }
138527
def log_prior(self):
        """"""
        for p, b in zip(self.parameter_vector, self.parameter_bounds):
            if b[0] is not None and p < b[0]:
                return -np.inf
            if b[1] is not None and p > b[1]:
                return -np.inf
        return 0.0
830575
def print_param_values(self_):
        """"""
        self = self_.self
        for name,val in self.param.get_param_values():
            print('%s.%s = %s' % (self.name,name,val))
223507
def logpdf(self, p):
        
        x2 = self.p2x(p) ** 2
        return -0.5 * numpy.sum(x2) - self.log_gnorm
570170
def get(self):
        
        self.log.debug('starting the ``get`` method')

        # APPEND TO FILENAME?
        if not self.append:
            self.append = ""

        if not self.readability:
            pdfPath = self._print_original_webpage()
        else:
            pdfPath = self._print_parsed_webpage()

        tag(
            log=self.log,
            filepath=pdfPath,
            tags="pop",
            rating=2,
            wherefrom=self.url
        )

        self.log.debug('completed the ``get`` method')
        return pdfPath
1195431
public String print(Map<String, String> parameters)
    {
        StringBuilder builder = new StringBuilder();

        for (Map.Entry<String, String> entry : parameters.entrySet()) {
            String value = entry.getValue();
            String key = entry.getKey();

            if (key != null && value != null) {
                if (builder.length() > 0) {
                    builder.append(' ');
                }
                builder.append(print(key, value));
            }
        }

        return builder.toString();
    }
18503
def get_logger(
        name, file_name=None, stream=None, template=None, propagate=False):
    

    logger = logging.getLogger(name)

    if propagate is not None:
        logger.propagate = propagate

    for handler in logger.handlers:
        logger.removeHandler(handler)

    if not template:
        template = "%(name)s %(process)s %(levelname)s %(message)s"

    formatter = logging.Formatter(template)

    if not file_name and not stream:
        stream = sys.stdout

    handlers = []

    if stream is not None:

        handlers.append(logging.StreamHandler(stream=stream))

    if file_name is not None:

        if os.path.isdir(os.path.dirname(file_name)):
            handlers.append(logging.FileHandler(file_name))
        else:
            print("ERROR: Can't open log file {}".format(file_name))

    for ch in handlers:
        ch.setFormatter(formatter)
        logger.addHandler(ch)

    logger.setLevel(logging.INFO)

    return logger