idht#

diffsptk.IDHT#

alias of InverseDiscreteHartleyTransform

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

This is the opposite module to DiscreteHartleyTransform().

Parameters:
dht_lengthint >= 1

The DHT length, \(L\).

dht_typeint in [1, 4]

The DHT type.

forward(y: Tensor) Tensor[source]#

Apply inverse DHT to the input.

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

The input.

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

The 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: Tensor, dht_type: int = 2) Tensor[source]#

Compute inverse DHT.

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

The input.

dht_typeint in [1, 4]

The DHT type.

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

The inverse DHT output.

See also

dht