numdifftools.limits.Limit

class numdifftools.limits.Limit(f, step=None, method='above', order=4, full_output=False)[source][source]

Compute limit of a function at a given point

Parameters:

f : callable

function of one array f(z, *args, **kwds) to compute the limit for. The function, f, is assumed to return a result of the same shape and size as its input, z.

step: float, complex, array-like or StepGenerator object, optional

Defines the spacing used in the approximation. Default is MinStepGenerator(base_step=step, step_ratio=4)

method : {‘above’, ‘below’}

defines if the limit is taken from above or below

order: positive scalar integer, optional.

defines the order of approximation used to find the specified limit. The order must be member of [1 2 3 4 5 6 7 8]. 4 is a good compromise.

Returns:

limit_fz: array like

estimated limit of f(z) as z –> z0

info:

Only given if full_output is True and contains the following: error estimate: ndarray

95 uncertainty estimate around the limit, such that abs(limit_fz - f(z0)*(z-z0)) < error_estimate

final_step: ndarray

final step used in approximation

__init__(f, step=None, method='above', order=4, full_output=False)[source][source]

Methods

__init__(f[, step, method, order, full_output])
limit(x, *args, **kwds)