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 />

Examples<br />

’quintic’: r**5<br />

’thin_plate’: r**2 * log(r)<br />

If callable, then it must take 2 arguments (self, r). The epsilon parameter will be<br />

available as self.epsilon. Other keyword arguments passed in will be available as<br />

well.<br />

epsilon : float, optional<br />

Adjustable constant for gaussian or multiquadrics functions - defaults to approximate<br />

average distance between nodes (which is a good start).<br />

smooth : float, optional<br />

Values greater than zero increase the smoothness of the approximation. 0 is for<br />

interpolation (default), the function will always go through the nodal points in this<br />

case.<br />

norm : callable, optional<br />

A function that returns the ‘distance’ between two points, with inputs as arrays of<br />

positions (x, y, z, ...), and an output as an array of distance. E.g, the default:<br />

def euclidean_norm(x1, x2):<br />

return sqrt( ((x1 - x2)**2).sum(axis=0) )<br />

which is called with x1=x1[ndims,newaxis,:] and x2=x2[ndims,:,newaxis] such that<br />

the result is a matrix of the distances from each point in x1 to each point in x2.<br />

>>> rbfi = Rbf(x, y, z, d) # radial basis function interpolator instance<br />

>>> di = rbfi(xi, yi, zi) # interpolated values<br />

3.5.3 1-D Splines<br />

UnivariateSpline(x, y[, w, bbox, Univariate spline s(x) of degree k on the interval [xb,xe] calculated<br />

k, s])<br />

from a given set of data points (x,y).<br />

InterpolatedUnivariateSpline(x, Interpolated univariate spline approximation.<br />

y[, w, bbox, k])<br />

LSQUnivariateSpline(x, y, t[, w, Weighted least-squares univariate spline approximation.<br />

bbox, k])<br />

class UnivariateSpline(x, y, w=None, bbox=, [None, None], k=3, s=None)<br />

Univariate spline s(x) of degree k on the interval [xb,xe] calculated from a given set of data points (x,y).<br />

Can include least-squares fitting.<br />

See Also:<br />

splrep, splev, sproot, spint, spalde<br />

BivariateSpline<br />

A similar class for bivariate spline interpolation<br />

194 Chapter 3. Reference

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

Saved successfully!

Ooh no, something went wrong!