numdifftools.extrapolation.Richardson

class numdifftools.extrapolation.Richardson(step_ratio=2.0, step=1, order=1, num_terms=2)[source][source]

Extrapolates as sequence with Richardsons method

Notes

Suppose you have series expansion that goes like this

L = f(h) + a0 * h^p_0 + a1 * h^p_1+ a2 * h^p_2 + ...

where p_i = order + step * i and f(h) -> L as h -> 0, but f(0) != L.

If we evaluate the right hand side for different stepsizes h we can fit a polynomial to that sequence of approximations. This is exactly what this class does.

__init__(step_ratio=2.0, step=1, order=1, num_terms=2)[source][source]

Methods

__init__([step_ratio, step, order, num_terms])
extrapolate(sequence, steps)