jax.scipy.fft.dctn#

jax.scipy.fft.dctn(x, type=2, s=None, axes=None, norm=None)[source]#

Return multidimensional Discrete Cosine Transform along the specified axes.

LAX-backend implementation of scipy.fft._realtransforms.dctn().

Original docstring below.

Parameters
  • x (array_like) – The input array.

  • type ({1, 2, 3, 4}, optional) – Type of the DCT (see Notes). Default type is 2.

  • s (int or array_like of ints or None, optional) – The shape of the result. If both s and axes (see below) are None, s is x.shape; if s is None but axes is not None, then s is numpy.take(x.shape, axes, axis=0). If s[i] > x.shape[i], the ith dimension is padded with zeros. If s[i] < x.shape[i], the ith dimension is truncated to length s[i]. If any element of s is -1, the size of the corresponding dimension of x is used.

  • axes (int or array_like of ints or None, optional) – Axes over which the DCT is computed. If not given, the last len(s) axes are used, or all axes if s is also not specified.

  • norm ({"backward", "ortho", "forward"}, optional) – Normalization mode (see Notes). Default is β€œbackward”.

Returns

y – The transformed input array.

Return type

ndarray of real