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