idht#

diffsptk.IDHT#

alias of InverseDiscreteHartleyTransform

class diffsptk.InverseDiscreteHartleyTransform(dht_length, dht_type=2)[source]#

This is the opposite module to DiscreteHartleyTransform().

Parameters:
dht_lengthint >= 1

DHT length, \(L\).

dht_typeint in [1, 4]

DHT type.

forward(y)[source]#

Apply inverse DHT to input.

Parameters:
yTensor [shape=(…, L)]

Input.

Returns:
outTensor [shape=(…, L)]

Inverse DHT output.

Examples

>>> x = diffsptk.ramp(3)
>>> dht = diffsptk.DHT(4)
>>> idht = diffsptk.IDHT(4)
>>> x2 = idht(dht(x))
>>> x2
tensor([5.9605e-08, 1.0000e+00, 2.0000e+00, 3.0000e+00])
diffsptk.functional.idht(y, dht_type=2)[source]#

Compute inverse DHT.

Parameters:
yTensor [shape=(…, L)]

Input.

dht_typeint in [1, 4]

DHT type.

Returns:
outTensor [shape=(…, L)]

Inverse DHT output.

See also

dht