PDF of X_t|X_{t-1}=xp
559047
def logpt(self, t, xp, x):
        """"""
        return self.ssm.PX(t, xp).logpdf(x)
1070695
def cot(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_cot,
        (BigFloat._implicit_convert(x),),
        context,
    )
1348769
def pdf(self, X):
                      
        return invwishart.pdf(X, df=self.v, scale=self.Psi)
616244
def cnst_AT(self, X):
        
        """

        return np.sum(np.concatenate(
            [sl.GTax(X[..., ax], ax)[..., np.newaxis] for ax in self.axes],
            axis=X.ndim-1), axis=X.ndim-1)
298509
def get_x():
    '''
    
    '''
    cmd = 'setxkbmap -query | grep layout'
    out = __salt__['cmd.run'](cmd, python_shell=True).split(':')
    return out[1].strip()
1149879
def par_xstep(i):
    

    """
    global mp_X
    global mp_DX
    YU0f = sl.rfftn(mp_Y0[[i]] - mp_U0[[i]], mp_Nv, mp_axisN)
    YU1f = sl.rfftn(mp_Y1[mp_grp[i]:mp_grp[i+1]] -
                    1/mp_alpha*mp_U1[mp_grp[i]:mp_grp[i+1]], mp_Nv, mp_axisN)
    if mp_Cd == 1:
        b = np.conj(mp_Df[mp_grp[i]:mp_grp[i+1]]) * YU0f + mp_alpha**2*YU1f
        Xf = sl.solvedbi_sm(mp_Df[mp_grp[i]:mp_grp[i+1]], mp_alpha**2, b,
                            mp_cache[i], axis=mp_axisM)
    else:
        b = sl.inner(np.conj(mp_Df[mp_grp[i]:mp_grp[i+1]]), YU0f,
                     axis=mp_C) + mp_alpha**2*YU1f
        Xf = sl.solvemdbi_ism(mp_Df[mp_grp[i]:mp_grp[i+1]], mp_alpha**2, b,
                              mp_axisM, mp_axisC)
    mp_X[mp_grp[i]:mp_grp[i+1]] = sl.irfftn(Xf, mp_Nv,
                                            mp_axisN)
    mp_DX[i] = sl.irfftn(sl.inner(mp_Df[mp_grp[i]:mp_grp[i+1]], Xf,
                                  mp_axisM), mp_Nv, mp_axisN)
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)
1270308
def x_runtime(f, *args, **kwargs):
    """"""

    _t0 = now()
    r = f(*args, **kwargs)
    _t1 = now()
    r.headers['X-Runtime'] = '{0}s'.format(Decimal(str(_t1 - _t0)))

    return r
292835
def uniform_pdf():
    
    norm_const = 1.0
    def pdf(x):
        return norm_const * np.sin(np.pi/180.0 * x)
    norm_dev = quad(pdf, 0.0, 180.0)[0]
    # ensure that the integral over the distribution equals 1
    norm_const /= norm_dev 
    return pdf
969104
def _posterior(self, x):
        
        yedge = self._nuis_pdf.marginalization_bins()
        yc = 0.5 * (yedge[1:] + yedge[:-1])
        yw = yedge[1:] - yedge[:-1]

        like_array = self.like(x[:, np.newaxis], yc[np.newaxis, :]) * yw
        like_array /= like_array.sum()

        self._post = like_array.sum(1)
        self._post_interp = castro.Interpolator(x, self._post)
        return self._post
960189
def resolve1(x, default=None):
    
    while isinstance(x, PDFObjRef):
        x = x.resolve(default=default)
    return x
275112
def EvalGaussianPdf(x, mu, sigma):
    
    return scipy.stats.norm.pdf(x, mu, sigma)
1119124
def _py2round(x):
    
    if hasattr(x, '__iter__'):
        rx = np.empty_like(x)
        m = x >= 0.0
        rx[m] = np.floor(x[m] + 0.5)
        m = np.logical_not(m)
        rx[m] = np.ceil(x[m] - 0.5)
        return rx

    else:
        if x >= 0.0:
            return np.floor(x + 0.5)
        else:
            return np.ceil(x - 0.5)
969807
def pdf(self, mu):
        
        if self.transform is not None:
            mu = self.transform(mu)             
        return (1.0/float(self.sigma0))*np.exp(-(0.5*(mu-self.mu0)**2)/float(self.sigma0**2))
559951
def total(self, xbin1=1, xbin2=-2):
        
        return self.hist.integral(xbin1=xbin1, xbin2=xbin2, error=True)
951337
def lnprior(x):
    """"""
    per, t0, b = x
    if b < -1 or b > 1:
        return -np.inf
    elif per < 7 or per > 10:
        return -np.inf
    elif t0 < 1978 or t0 > 1979:
        return -np.inf
    else:
        return 0.
607121
def gauss_pdf(x, mu, sigma):
    """"""
    return 1 / np.sqrt(2 * np.pi) / sigma * np.exp(-(x - mu) ** 2 / 2. / sigma ** 2)