Did I find the right examples for you? yes no

All Samples(26)  |  Call(22)  |  Derive(0)  |  Import(4)

src/s/c/scipy-0.13.3/scipy/special/tests/test_basic.py   scipy(Download)
from scipy.special import ellipk
 
from scipy.special._testutils import assert_tol_equal, with_special_errors, \
     assert_func_equal
 
            [10.92, 2.22993515861399, -0.00585728, 10.468891352063146],
            [136, 3.5252179590758828, 19448, 1024.5526916174495]])
        assert_func_equal(cephes.binom, rknown.ravel(), nk, rtol=1e-13)
 
        # Test branches in implementation
                      ).reshape(2, -1).T
 
        assert_func_equal(cephes.binom,
                          cephes.binom(nk[:,0], nk[:,1] * (1 + 1e-15)),
                          nk,
                      ).reshape(2, -1).T
 
        assert_func_equal(cephes.binom,
                          cephes.binom(nk[:,0], nk[:,1] * (1 + 1e-15)),
                          nk,
                      ).reshape(2, -1).T
        nk = nk[nk[:,0] >= nk[:,1]]
        assert_func_equal(cephes.binom,
                          binom_int(nk[:,0], nk[:,1]),
                          nk,

src/s/c/scipy-HEAD/scipy/special/tests/test_basic.py   scipy(Download)
from scipy.special import ellipk
 
from scipy.special._testutils import assert_tol_equal, with_special_errors, \
     assert_func_equal
 
            [10.92, 2.22993515861399, -0.00585728, 10.468891352063146],
            [136, 3.5252179590758828, 19448, 1024.5526916174495]])
        assert_func_equal(cephes.binom, rknown.ravel(), nk, rtol=1e-13)
 
        # Test branches in implementation
                      ).reshape(2, -1).T
 
        assert_func_equal(cephes.binom,
                          cephes.binom(nk[:,0], nk[:,1] * (1 + 1e-15)),
                          nk,
                      ).reshape(2, -1).T
 
        assert_func_equal(cephes.binom,
                          cephes.binom(nk[:,0], nk[:,1] * (1 + 1e-15)),
                          nk,
                      ).reshape(2, -1).T
        nk = nk[nk[:,0] >= nk[:,1]]
        assert_func_equal(cephes.binom,
                          binom_int(nk[:,0], nk[:,1]),
                          nk,

src/s/c/scipy-HEAD/scipy/special/tests/test_mpmath.py   scipy(Download)
import scipy.special as sc
 
from scipy.special._testutils import FuncData, assert_func_equal
 
try:
        points = np.r_[x1.ravel(),x2.ravel()] + 1j*np.r_[y1.ravel(),y2.ravel()]
 
        assert_func_equal(sc.erf, lambda x: complex(mpmath.erf(x)), points,
                          vectorized=False, rtol=1e-13)
        assert_func_equal(sc.erfc, lambda x: complex(mpmath.erfc(x)), points,
        mpmath.mp.dps = 400
 
        assert_func_equal(sc.beta,
                          lambda a, b: float(mpmath.beta(a, b)),
                          ab,
                          vectorized=False,
                          rtol=1e-10)
 
        assert_func_equal(
            sc.betaln,

src/m/i/MissionPlanner-HEAD/Lib/site-packages/scipy/special/tests/test_mpmath.py   MissionPlanner(Download)
import scipy.special as sc
 
from scipy.special._testutils import FuncData, assert_func_equal
 
if sys.platform == 'cli':
        # note that the global accuracy of our complex erf algorithm is limited
        # roughly to 2e-8
        assert_func_equal(sc.erf, lambda x: complex(mpmath.erf(x)), points,
                          vectorized=False, rtol=2e-8)
    finally: