|  View source on GitHub | 
Computes the 1D Discrete Cosine Transform (DCT) of input.
tf.signal.dct(
    input, type=2, n=None, axis=-1, norm=None, name=None
)
Types I, II, III and IV are supported.
Type I is implemented using a length 2N padded tf.signal.rfft.
Type II is implemented using a length 2N padded tf.signal.rfft, as
 described here: Type 2 DCT using 2N FFT padded (Makhoul).
Type III is a fairly straightforward inverse of Type II
 (i.e. using a length 2N padded tf.signal.irfft).
 Type IV is calculated through 2N length DCT2 of padded signal and
picking the odd indices.
| Returns | |
|---|---|
| A [..., samples]float32/float64Tensorcontaining the DCT ofinput. | 
| Raises | |
|---|---|
| ValueError | If typeis not1,2,3or4,axisis
not-1,nis notNoneor greater than 0,
ornormis notNoneor'ortho'. | 
| ValueError | If typeis1andnormisortho. | 
scipy compatibility
Equivalent to scipy.fftpack.dct for Type-I, Type-II, Type-III and Type-IV DCT.