norm0#

class diffsptk.AllPoleToAllZeroDigitalFilterCoefficients(filter_order: int)[source]#

See this page for details.

Parameters:
filter_orderint >= 0

The order of the filter coefficients, \(M\).

forward(a: Tensor) Tensor[source]#

Convert all-pole to all-zero filter coefficients vice versa.

Parameters:
aTensor [shape=(…, M+1)]

The all-pole or all-zero filter coefficients.

Returns:
outTensor [shape=(…, M+1)]

The all-zero or all-pole filter coefficients.

Examples

>>> a = diffsptk.ramp(4, 1, -1)
>>> norm0 = diffsptk.AllPoleToAllZeroDigitalFilterCoefficients(3)
>>> b = norm0(a)
>>> b
tensor([0.2500, 0.7500, 0.5000, 0.2500])
diffsptk.functional.norm0(a: Tensor) Tensor[source]#

Convert all-pole to all-zero filter coefficients vice versa.

Parameters:
aTensor [shape=(…, M+1)]

The all-pole or all-zero filter coefficients.

Returns:
outTensor [shape=(…, M+1)]

The all-zero or all-pole filter coefficients.

See also

zerodf