bundles / scipy latest / scipy / interpolate / _pade / pade
function
scipy.interpolate._pade:pade
source: build-install/usr/lib/python3.14/site-packages/scipy/interpolate/_pade.py:10
Signature
def pade(an, m, n = None)Summary
Return Pade approximation to a polynomial as the ratio of two polynomials.
Extended Summary
Parameters
an: (N,) array_likeTaylor series coefficients.
m: intThe order of the returned approximating polynomial q.
n: int, optionalThe order of the returned approximating polynomial p. By default, the order is
len(an)-1-m.
Returns
p, q: Polynomial classThe Pade approximation of the polynomial defined by
anisp(x)/q(x).
Notes
Array API Standard Support
pade is not in-scope for support of Python Array API Standard compatible backends other than NumPy.
See dev-arrayapi for more information.
Examples
import numpy as np 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)✓
e_poly(1)
✗np.float64(2.716666666666667)
p(1)/q(1)
✗np.float64(2.717948717948718)
Aliases
scipy.interpolate.pade