2.2.1.1. sdepy.process.interp

process.interp(*, kind=None)[source]

Interpolation in time of the process values.

Returns a callable f, as returned by scipy.interpolate.interp1d, such that f(s) approximates the value of the process at time point s. f refers to the process timeline and values, without storing copies. s may be of any shape.

Parameters:
kind : string, optional

An interpolation kind as accepted by scipy.interpolate.interp1d. If None, defaults to the interp_kind attribute.

Returns:
f : callable

f, as returned by scipy.interpolate.interp1d, such that f(s) approximates the value of the process at time point s. f refers to the process timeline and values, without storing copies.

s may be of any shape: if p is a process instance, p.interp()(s).shape == s.shape + p.vshape + (p.paths,).

In case p has a single time point, interpolation is not handled via scipy.interpolate.interp1d; the process is assumed to be constant in time, and f is a function object behaving accordingly.

See also

process.__call__

Notes

The process is extrapolated as constant outside the timeline boundaries.

If p is a process instance, p.interp(s) is an array, not a process. If an interpolated process is needed, it should be explicitly created using q = process(s, x=p(s)), or its shorthand q = p.rebase(s).