Did I find the right examples for you? yes no

# scipy.special._testutils.assert_func_equal

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

```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,
```

```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,
```

```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,
```

```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:
```