decimate#
- class diffsptk.Decimation(period: int, start: int = 0, dim: int = -1)[source]#
See this page for details.
- Parameters:
- periodint >= 1
The decimation period, \(P\).
- startint >= 0
The start point, \(S\).
- dimint
The dimension along which to decimate the tensors.
- forward(x: Tensor) Tensor [source]#
Decimate the input signal.
- Parameters:
- xTensor [shape=(…, T, …)]
The input signal.
- Returns:
- outTensor [shape=(…, T/P-S, …)]
The decimated signal.
Examples
>>> x = diffsptk.ramp(9) >>> decimate = diffsptk.Decimation(3, start=1) >>> y = decimate(x) >>> y tensor([1., 4., 7.])
- diffsptk.functional.decimate(x: Tensor, period: int = 1, start: int = 0, dim: int = -1) Tensor [source]#
Decimate the input signal.
- Parameters:
- xTensor [shape=(…, T, …)]
The input signal.
- periodint >= 1
The decimation period, \(P\).
- startint >= 0
The start point, \(S\).
- dimint
The dimension along which to decimate the tensors.
- Returns:
- outTensor [shape=(…, T/P-S, …)]
The decimated signal.
See also