Previous topic

Input Parameter

Next topic

Operations on expression trees

This Page

Interpolant

class pybamm.Interpolant(x, y, children, name=None, interpolator=None, extrapolate=True, entries_string=None)[source]

Interpolate data in 1D.

Parameters:
  • x (iterable of numpy.ndarray) – 1-D array(s) of real values defining the data point coordinates.
  • y (numpy.ndarray) – The values of the function to interpolate at the data points.
  • children (iterable of pybamm.Symbol) – Node(s) to use when evaluating the interpolant. Each child corresponds to an entry of x
  • name (str, optional) – Name of the interpolant. Default is None, in which case the name “interpolating function” is given.
  • interpolator (str, optional) – Which interpolator to use (“linear”, “pchip”, or “cubic spline”).
  • extrapolate (bool, optional) – Whether to extrapolate for points that are outside of the parametrisation range, or return NaN (following default behaviour from scipy). Default is True.
  • **Extends** (pybamm.Function) –
set_id()[source]

See pybamm.Symbol.set_id().