interpolate#
- class diffsptk.Interpolation(period, start=0, dim=-1)[source]#
See this page for details.
- Parameters:
- periodint >= 1
The interpolation period, \(P\).
- startint >= 0
The start point, \(S\).
- dimint
The dimension along which to interpolate the tensors.
- forward(x)[source]#
Interpolate the input signal.
- Parameters:
- xTensor [shape=(…, T, …)]
The input signal.
- Returns:
- outTensor [shape=(…, TxP+S, …)]
The interpolated signal.
Examples
>>> x = diffsptk.ramp(1, 3) >>> interpolate = diffsptk.Interpolation(3, start=1) >>> y = interpolate(x) >>> y tensor([0., 1., 0., 0., 2., 0., 0., 3., 0., 0.])
- diffsptk.functional.interpolate(x, period=1, start=0, dim=-1)[source]#
Interpolate the input signal.
- Parameters:
- xTensor [shape=(…, T, …)]
The input signal.
- periodint >= 1
The interpolation period, \(P\).
- startint >= 0
The start point, \(S\).
- dimint
The dimension along which to interpolate the tensors.
- Returns:
- outTensor [shape=(…, TxP+S, …)]
The interpolated signal.
See also