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


Python special.gammaincinv方法代码示例

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


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

示例1: _ppf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def _ppf(self, q, df):
        return np.sqrt(2*sc.gammaincinv(.5*df, q)) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:4,代码来源:_continuous_distns.py

示例2: _isf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def _isf(self, q, a, c):
        val1 = sc.gammaincinv(a, q)
        val2 = sc.gammainccinv(a, q)
        return np.where(c > 0, val2, val1)**(1.0/c) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:6,代码来源:_continuous_distns.py

示例3: test_gammainccinv

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_gammainccinv(self):
        gccinv = special.gammainccinv(.5,.5)
        gcinv = special.gammaincinv(.5,.5)
        assert_almost_equal(gccinv,gcinv,8) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:6,代码来源:test_basic.py

示例4: test_gammaincinv

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_gammaincinv(self):
        y = special.gammaincinv(.4,.4)
        x = special.gammainc(.4,y)
        assert_almost_equal(x,0.4,1)
        y = special.gammainc(10, 0.05)
        x = special.gammaincinv(10, 2.5715803516000736e-20)
        assert_almost_equal(0.05, x, decimal=10)
        assert_almost_equal(y, 2.5715803516000736e-20, decimal=10)
        x = special.gammaincinv(50, 8.20754777388471303050299243573393e-18)
        assert_almost_equal(11.0, x, decimal=10) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:12,代码来源:test_basic.py

示例5: test_975

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_975(self):
        # Regression test for ticket #975 -- switch point in algorithm
        # check that things work OK at the point, immediately next floats
        # around it, and a bit further away
        pts = [0.25,
               np.nextafter(0.25, 0), 0.25 - 1e-12,
               np.nextafter(0.25, 1), 0.25 + 1e-12]
        for xp in pts:
            y = special.gammaincinv(.4, xp)
            x = special.gammainc(0.4, y)
            assert_tol_equal(x, xp, rtol=1e-12) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:13,代码来源:test_basic.py

示例6: test_975

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_975(self):
        # Regression test for ticket #975 -- switch point in algorithm
        # check that things work OK at the point, immediately next floats
        # around it, and a bit further away
        pts = [0.25,
               np.nextafter(0.25, 0), 0.25 - 1e-12,
               np.nextafter(0.25, 1), 0.25 + 1e-12]
        for xp in pts:
            y = special.gammaincinv(.4, xp)
            x = special.gammainc(0.4, y)
            assert_allclose(x, xp, rtol=1e-12) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:13,代码来源:test_basic.py

示例7: test_gammainc_roundtrip

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_gammainc_roundtrip():
    a = np.logspace(-5, 10, 100)
    x = np.logspace(-5, 10, 100)

    y = sc.gammaincinv(a, sc.gammainc(a, x))
    assert_allclose(x, y, rtol=1e-10) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:8,代码来源:test_gammainc.py


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