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


Python special.bdtr方法代碼示例

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


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

示例1: test_legacy

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import bdtr [as 別名]
def test_legacy():
    warn_ctx = WarningManager()
    warn_ctx.__enter__()
    try:
        warnings.simplefilter("ignore", RuntimeWarning)

        # Legacy behavior: truncating arguments to integers
        assert_equal(special.bdtrc(1, 2, 0.3), special.bdtrc(1.8, 2.8, 0.3))
        assert_equal(special.bdtr(1, 2, 0.3), special.bdtr(1.8, 2.8, 0.3))
        assert_equal(special.bdtri(1, 2, 0.3), special.bdtri(1.8, 2.8, 0.3))
        assert_equal(special.expn(1, 0.3), special.expn(1.8, 0.3))
        assert_equal(special.hyp2f0(1, 2, 0.3, 1), special.hyp2f0(1, 2, 0.3, 1.8))
        assert_equal(special.nbdtrc(1, 2, 0.3), special.nbdtrc(1.8, 2.8, 0.3))
        assert_equal(special.nbdtr(1, 2, 0.3), special.nbdtr(1.8, 2.8, 0.3))
        assert_equal(special.nbdtri(1, 2, 0.3), special.nbdtri(1.8, 2.8, 0.3))
        assert_equal(special.pdtrc(1, 0.3), special.pdtrc(1.8, 0.3))
        assert_equal(special.pdtr(1, 0.3), special.pdtr(1.8, 0.3))
        assert_equal(special.pdtri(1, 0.3), special.pdtri(1.8, 0.3))
        assert_equal(special.kn(1, 0.3), special.kn(1.8, 0.3))
        assert_equal(special.yn(1, 0.3), special.yn(1.8, 0.3))
        assert_equal(special.smirnov(1, 0.3), special.smirnov(1.8, 0.3))
        assert_equal(special.smirnovi(1, 0.3), special.smirnovi(1.8, 0.3))
    finally:
        warn_ctx.__exit__() 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:26,代碼來源:test_basic.py

示例2: test_legacy

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import bdtr [as 別名]
def test_legacy():
    # Legacy behavior: truncating arguments to integers
    with suppress_warnings() as sup:
        sup.filter(RuntimeWarning, "floating point number truncated to an integer")
        assert_equal(special.bdtrc(1, 2, 0.3), special.bdtrc(1.8, 2.8, 0.3))
        assert_equal(special.bdtr(1, 2, 0.3), special.bdtr(1.8, 2.8, 0.3))
        assert_equal(special.bdtri(1, 2, 0.3), special.bdtri(1.8, 2.8, 0.3))
        assert_equal(special.expn(1, 0.3), special.expn(1.8, 0.3))
        assert_equal(special.hyp2f0(1, 2, 0.3, 1), special.hyp2f0(1, 2, 0.3, 1.8))
        assert_equal(special.nbdtrc(1, 2, 0.3), special.nbdtrc(1.8, 2.8, 0.3))
        assert_equal(special.nbdtr(1, 2, 0.3), special.nbdtr(1.8, 2.8, 0.3))
        assert_equal(special.nbdtri(1, 2, 0.3), special.nbdtri(1.8, 2.8, 0.3))
        assert_equal(special.pdtrc(1, 0.3), special.pdtrc(1.8, 0.3))
        assert_equal(special.pdtr(1, 0.3), special.pdtr(1.8, 0.3))
        assert_equal(special.pdtri(1, 0.3), special.pdtri(1.8, 0.3))
        assert_equal(special.kn(1, 0.3), special.kn(1.8, 0.3))
        assert_equal(special.yn(1, 0.3), special.yn(1.8, 0.3))
        assert_equal(special.smirnov(1, 0.3), special.smirnov(1.8, 0.3))
        assert_equal(special.smirnovi(1, 0.3), special.smirnovi(1.8, 0.3)) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:21,代碼來源:test_basic.py

示例3: _cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import bdtr [as 別名]
def _cdf(self, x, n, p):
        k = floor(x)
        vals = special.bdtr(k, n, p)
        return vals 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:6,代碼來源:_discrete_distns.py

示例4: _ppf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import bdtr [as 別名]
def _ppf(self, q, n, p):
        vals = ceil(special.bdtrik(q, n, p))
        vals1 = np.maximum(vals - 1, 0)
        temp = special.bdtr(vals1, n, p)
        return np.where(temp >= q, vals1, vals) 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:7,代碼來源:_discrete_distns.py

示例5: test_bdtr

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import bdtr [as 別名]
def test_bdtr(self):
        assert_equal(cephes.bdtr(1,1,0.5),1.0) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:4,代碼來源:test_basic.py

示例6: _cdf

# 需要導入模塊: from scipy import special [as 別名]
# 或者: from scipy.special import bdtr [as 別名]
def _cdf(self, x_data, size, prob):
        return special.bdtr(numpy.floor(x_data), numpy.floor(size), prob) 
開發者ID:jonathf,項目名稱:chaospy,代碼行數:4,代碼來源:binomial.py


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