15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SciPy Reference Guide, Release 0.8.dev<br />

Dierckx P.<br />

[An algorithm for surface fitting with spline functions] Ima J. Numer. Anal. 1 (1981) 267-283.<br />

Dierckx P.<br />

[An algorithm for surface fitting with spline functions] report tw50, Dept. Computer Science,K.U.Leuven,<br />

1980.<br />

Dierckx P.<br />

[Curve and surface fitting with splines, Monographs on] Numerical Analysis, Oxford University<br />

Press, 1993.<br />

3.5.5 Additional tools<br />

lagrange(x, w) Return the Lagrange interpolating polynomial of the<br />

data-points (x,w)<br />

approximate_taylor_polynomial(f, x, Estimate the Taylor polynomial of f at x by polynomial<br />

degree, ...)<br />

fitting<br />

lagrange(x, w)<br />

Return the Lagrange interpolating polynomial of the data-points (x,w)<br />

Warning: This implementation is numerically unstable; do not expect to be able to use more than about 20 points<br />

even if they are chosen optimally.<br />

approximate_taylor_polynomial(f, x, degree, scale, order=None)<br />

Estimate the Taylor polynomial of f at x by polynomial fitting<br />

A polynomial Parameters ———- f : callable<br />

x<br />

The function whose Taylor polynomial is sought. Should accept a vector of x values.<br />

[scalar] The point at which the polynomial is to be evaluated.<br />

degree<br />

[integer] The degree of the Taylor polynomial<br />

scale<br />

[scalar] The width of the interval to use to evaluate the Taylor polynomial. Function values spread over a<br />

range this wide are used to fit the polynomial. Must be chosen carefully.<br />

order<br />

[integer or None] The order of the polynomial to be used in the fitting; f will be evaluated order+1 times.<br />

If None, use degree.<br />

Notes<br />

Returns<br />

p : poly1d<br />

the Taylor polynomial (translated to the origin, so that for example p(0)=f(x)).<br />

The appropriate choice of “scale” is a tradeoff - too large and the function differs from its Taylor polynomial<br />

too much to get a good answer, too small and roundoff errors overwhelm the higher-order terms. The algorithm<br />

used becomes numerically unstable around order 30 even under ideal circumstances.<br />

Choosing order somewhat larger than degree may improve the higher-order terms.<br />

210 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!