Python scipy.special.bdtrc() Examples
The following are 8
code examples of scipy.special.bdtrc().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
scipy.special
, or try the search function
.
Example #1
Source File: test_basic.py From Computable with MIT License | 6 votes |
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__()
Example #2
Source File: test_basic.py From GraphicDesignPatternByPython with MIT License | 6 votes |
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))
Example #3
Source File: _discrete_distns.py From lambda-packs with MIT License | 5 votes |
def _sf(self, x, n, p): k = floor(x) return special.bdtrc(k, n, p)
Example #4
Source File: test_basic.py From Computable with MIT License | 5 votes |
def test_bdtrc(self): assert_equal(cephes.bdtrc(1,3,0.5),0.5)
Example #5
Source File: _discrete_distns.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def _sf(self, x, n, p): k = floor(x) return special.bdtrc(k, n, p)
Example #6
Source File: test_basic.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def test_bdtrc(self): assert_equal(cephes.bdtrc(1,3,0.5),0.5)
Example #7
Source File: test_nan_inputs.py From GraphicDesignPatternByPython with MIT License | 5 votes |
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))
Example #8
Source File: _discrete_distns.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def _sf(self, x, n, p): k = floor(x) return special.bdtrc(k, n, p)