interpolate#
- class diffsptk.Interpolation(period, start=0, dim=-1)[source]#
See this page for details.
- Parameters:
- periodint >= 1
Interpolation period, \(P\).
- startint >= 0
Start point, \(S\).
- dimint
Dimension along which to interpolate the tensors.
- forward(x)[source]#
Interpolate signal.
- Parameters:
- xTensor [shape=(…, T, …)]
Signal.
- Returns:
- outTensor [shape=(…, TxP+S, …)]
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 signal.
- Parameters:
- xTensor [shape=(…, T, …)]
Signal.
- periodint >= 1
Interpolation period, \(P\).
- startint >= 0
Start point, \(S\).
- dimint
Dimension along which to interpolate the tensors.
- Returns:
- outTensor [shape=(…, TxP+S, …)]
Interpolated signal.
See also