scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
pade(an, m, n=None)

Parameters

an : (N,) array_like

Taylor series coefficients.

m : int

The order of the returned approximating polynomial q.

n : int, optional

The order of the returned approximating polynomial p. By default, the order is len(an)-1-m .

Returns

p, q : Polynomial class

The Pade approximation of the polynomial defined by :None:None:`an` is p(x)/q(x) .

Return Pade approximation to a polynomial as the ratio of two polynomials.

Examples

>>> from scipy.interpolate import pade
... e_exp = [1.0, 1.0, 1.0/2.0, 1.0/6.0, 1.0/24.0, 1.0/120.0]
... p, q = pade(e_exp, 2)
>>> e_exp.reverse()
... e_poly = np.poly1d(e_exp)

Compare e_poly(x) and the Pade approximation p(x)/q(x)

>>> e_poly(1)
2.7166666666666668
>>> p(1)/q(1)
2.7179487179487181
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.interpolate._pade.pade

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/interpolate/_pade.py#6
type: <class 'function'>
Commit: