当前位置: 首页>>代码示例>>Python>>正文


Python special.bdtrc方法代码示例

本文整理汇总了Python中scipy.special.bdtrc方法的典型用法代码示例。如果您正苦于以下问题:Python special.bdtrc方法的具体用法?Python special.bdtrc怎么用?Python special.bdtrc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在scipy.special的用法示例。


在下文中一共展示了special.bdtrc方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_legacy

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import bdtrc [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 bdtrc [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: _sf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import bdtrc [as 别名]
def _sf(self, x, n, p):
        k = floor(x)
        return special.bdtrc(k, n, p) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:5,代码来源:_discrete_distns.py

示例4: test_bdtrc

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import bdtrc [as 别名]
def test_bdtrc(self):
        assert_equal(cephes.bdtrc(1,3,0.5),0.5) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:4,代码来源:test_basic.py

示例5: test_legacy_cast

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import bdtrc [as 别名]
def test_legacy_cast():
    with suppress_warnings() as sup:
        sup.filter(RuntimeWarning,
                   "floating point number truncated to an integer")
        res = sc.bdtrc(np.nan, 1, 0.5)
        assert_(np.isnan(res)) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:8,代码来源:test_nan_inputs.py


注:本文中的scipy.special.bdtrc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。