norm0#

class diffsptk.AllPoleToAllZeroDigitalFilterCoefficients(filter_order)[source]#

See this page for details.

Parameters:
filter_orderint >= 0

Order of filter coefficients, \(M\).

forward(a)[source]#

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

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

All-pole or all-zero filter coefficients.

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

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)[source]#

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

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

All-pole or all-zero filter coefficients.

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

All-zero or all-pole filter coefficients.

See also

zerodf