package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `Rbf
]
type t = [ `Object | `Rbf ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : ?kwargs:(string * Py.Object.t) list -> Py.Object.t list -> t

Rbf( *args)

A class for radial basis function interpolation of functions from N-D scattered data to an M-D domain.

Parameters ---------- *args : arrays x, y, z, ..., d, where x, y, z, ... are the coordinates of the nodes and d is the array of values at the nodes function : str or callable, optional The radial basis function, based on the radius, r, given by the norm (default is Euclidean distance); the default is 'multiquadric'::

'multiquadric': sqrt((r/self.epsilon)**2 + 1) 'inverse': 1.0/sqrt((r/self.epsilon)**2 + 1) 'gaussian': exp(-(r/self.epsilon)**2) 'linear': r 'cubic': r**3 'quintic': r**5 'thin_plate': r**2 * log(r)

If callable, then it must take 2 arguments (self, r). The epsilon parameter will be available as self.epsilon. Other keyword arguments passed in will be available as well.

epsilon : float, optional Adjustable constant for gaussian or multiquadrics functions

  • defaults to approximate average distance between nodes (which is a good start). smooth : float, optional Values greater than zero increase the smoothness of the approximation. 0 is for interpolation (default), the function will always go through the nodal points in this case. norm : str, callable, optional A function that returns the 'distance' between two points, with inputs as arrays of positions (x, y, z, ...), and an output as an array of distance. E.g., the default: 'euclidean', such that the result is a matrix of the distances from each point in ``x1`` to each point in ``x2``. For more options, see documentation of `scipy.spatial.distances.cdist`. mode : str, optional Mode of the interpolation, can be '1-D' (default) or 'N-D'. When it is '1-D' the data `d` will be considered as 1-D and flattened internally. When it is 'N-D' the data `d` is assumed to be an array of shape (n_samples, m), where m is the dimension of the target domain.

Attributes ---------- N : int The number of data points (as determined by the input arrays). di : ndarray The 1-D array of data values at each of the data coordinates `xi`. xi : ndarray The 2-D array of data coordinates. function : str or callable The radial basis function. See description under Parameters. epsilon : float Parameter used by gaussian or multiquadrics functions. See Parameters. smooth : float Smoothing parameter. See description under Parameters. norm : str or callable The distance function. See description under Parameters. mode : str Mode of the interpolation. See description under Parameters. nodes : ndarray A 1-D array of node values for the interpolation. A : internal property, do not use

Examples -------- >>> from scipy.interpolate import Rbf >>> x, y, z, d = np.random.rand(4, 50) >>> rbfi = Rbf(x, y, z, d) # radial basis function interpolator instance >>> xi = yi = zi = np.linspace(0, 1, 20) >>> di = rbfi(xi, yi, zi) # interpolated values >>> di.shape (20,)

val n : t -> int

Attribute N: get value or raise Not_found if None.

val n_opt : t -> int option

Attribute N: get value as an option.

val di : t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

Attribute di: get value or raise Not_found if None.

val di_opt : t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t option

Attribute di: get value as an option.

val xi : t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

Attribute xi: get value or raise Not_found if None.

val xi_opt : t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t option

Attribute xi: get value as an option.

val function_ : t -> Py.Object.t

Attribute function: get value or raise Not_found if None.

val function_opt : t -> Py.Object.t option

Attribute function: get value as an option.

val epsilon : t -> float

Attribute epsilon: get value or raise Not_found if None.

val epsilon_opt : t -> float option

Attribute epsilon: get value as an option.

val smooth : t -> float

Attribute smooth: get value or raise Not_found if None.

val smooth_opt : t -> float option

Attribute smooth: get value as an option.

val norm : t -> Py.Object.t

Attribute norm: get value or raise Not_found if None.

val norm_opt : t -> Py.Object.t option

Attribute norm: get value as an option.

val mode : t -> string

Attribute mode: get value or raise Not_found if None.

val mode_opt : t -> string option

Attribute mode: get value as an option.

val nodes : t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

Attribute nodes: get value or raise Not_found if None.

val nodes_opt : t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t option

Attribute nodes: get value as an option.

val a : t -> Py.Object.t

Attribute A: get value or raise Not_found if None.

val a_opt : t -> Py.Object.t option

Attribute A: get value as an option.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Stdlib.Format.formatter -> t -> unit

Pretty-print the object to a formatter.