當前位置: 首頁>>代碼示例>>Python>>正文


Python special.stdtr方法代碼示例

本文整理匯總了Python中scipy.special.stdtr方法的典型用法代碼示例。如果您正苦於以下問題:Python special.stdtr方法的具體用法?Python special.stdtr怎麽用?Python special.stdtr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在scipy.special的用法示例。


在下文中一共展示了special.stdtr方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def _cdf(self, x, df):
        return sc.stdtr(df, x) 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:4,代碼來源:_continuous_distns.py

示例2: _sf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def _sf(self, x, df):
        return sc.stdtr(df, -x) 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:4,代碼來源:_continuous_distns.py

示例3: test_stdtr

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def test_stdtr(self):
        # Ideally the left endpoint for Arg() should be 0.
        assert_mpmath_equal(
            sp.stdtr,
            _student_t_cdf,
            [IntArg(1, 100), Arg(1e-10, np.inf)], rtol=1e-7) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:8,代碼來源:test_cdflib.py

示例4: batched_univ_t_cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def batched_univ_t_cdf(x, loc, scale, dof):
  x, loc, scale, dof = np.squeeze(x), np.squeeze(loc), np.squeeze(scale), np.squeeze(dof)
  assert x.shape == loc.shape == scale.shape == dof.shape and x.ndim == 1
  x_norm = (x - loc) / scale
  p = stdtr(dof, x_norm)
  return p 
開發者ID:freelunchtheorem,項目名稱:Conditional_Density_Estimation,代碼行數:8,代碼來源:distribution.py

示例5: _cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def _cdf(self, x, df, C, Ci):
        out = special.stdtr(df, numpy.dot(Ci, special.stdtrit(df, x)))
        return out 
開發者ID:jonathf,項目名稱:chaospy,代碼行數:5,代碼來源:t_copula.py

示例6: _ppf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def _ppf(self, q, df, C, Ci):
        out = special.stdtr(df, numpy.dot(C, special.stdtrit(df, q)))
        return out 
開發者ID:jonathf,項目名稱:chaospy,代碼行數:5,代碼來源:t_copula.py

示例7: _cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def _cdf(self, x, a, C, Ci, loc):
        x = numpy.dot(Ci, (x.T-loc.T).T)
        return special.stdtr(a, x) 
開發者ID:jonathf,項目名稱:chaospy,代碼行數:5,代碼來源:mv_student_t.py

示例8: _cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def _cdf(self, x, a):
        return special.stdtr(a, x) 
開發者ID:jonathf,項目名稱:chaospy,代碼行數:4,代碼來源:student_t.py

示例9: test_nonfinite

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import stdtr [as 別名]
def test_nonfinite():
    funcs = [
        ("btdtria", 3),
        ("btdtrib", 3),
        ("bdtrik", 3),
        ("bdtrin", 3),
        ("chdtriv", 2),
        ("chndtr", 3),
        ("chndtrix", 3),
        ("chndtridf", 3),
        ("chndtrinc", 3),
        ("fdtridfd", 3),
        ("ncfdtr", 4),
        ("ncfdtri", 4),
        ("ncfdtridfn", 4),
        ("ncfdtridfd", 4),
        ("ncfdtrinc", 4),
        ("gdtrix", 3),
        ("gdtrib", 3),
        ("gdtria", 3),
        ("nbdtrik", 3),
        ("nbdtrin", 3),
        ("nrdtrimn", 3),
        ("nrdtrisd", 3),
        ("pdtrik", 2),
        ("stdtr", 2),
        ("stdtrit", 2),
        ("stdtridf", 2),
        ("nctdtr", 3),
        ("nctdtrit", 3),
        ("nctdtridf", 3),
        ("nctdtrinc", 3),
        ("tklmbda", 2),
    ]

    np.random.seed(1)

    for func, numargs in funcs:
        func = getattr(sp, func)

        args_choices = [(float(x), np.nan, np.inf, -np.inf) for x in
                        np.random.rand(numargs)]

        for args in itertools.product(*args_choices):
            res = func(*args)

            if any(np.isnan(x) for x in args):
                # Nan inputs should result to nan output
                assert_equal(res, np.nan)
            else:
                # All other inputs should return something (but not
                # raise exceptions or cause hangs)
                pass 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:55,代碼來源:test_cdflib.py


注:本文中的scipy.special.stdtr方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。