INNER CODE UNIT · Python
tol
sdv-dev/Copulas · copulas/optimize/__init__.py:118
tol = 2 * eps_m * np.abs(xm) + eps_a
tlim = tol / np.abs(b - c)
terminate = np.logical_or(terminate, np.logical_or(fm == 0, tlim > 0.5))
if np.all(terminate):
break
iterations += 1 - terminate
# Figure out values xi and phi
# to determine which method we should use next
xi = (a - b) / (c - b)
phi = (fa - fb) / (fc - fb)
iqi = np.logical_and(phi**2 < xi, (1 - phi) ** 2 < 1 - xi)
if not shape:
# scalar case
if iqi:
# inverse quadratic interpolation