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 byscipy.interpolate.interp1d
, such thatf(s)
approximates the value of the process at time points
.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 theinterp_kind
attribute.
Returns: - f : callable
f
, as returned by scipy.interpolate.interp1d, such thatf(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: ifp
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 viascipy.interpolate.interp1d
; the process is assumed to be constant in time, andf
is a function object behaving accordingly.
See also
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 usingq = process(s, x=p(s))
, or its shorthandq = p.rebase(s)
.