SciPy

scipy.fft.dstn

scipy.fft.dstn(x, type=2, s=None, axes=None, norm=None, overwrite_x=False, workers=None)[source]

Return multidimensional Discrete Sine Transform along the specified axes.

Parameters
xarray_like

The input array.

type{1, 2, 3, 4}, optional

Type of the DST (see Notes). Default type is 2.

sint 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 scipy.take(x.shape, axes, axis=0). If s[i] > x.shape[i], the i-th dimension is padded with zeros. If s[i] < x.shape[i], the i-th dimension is truncated to length s[i]. If any element of shape is -1, the size of the corresponding dimension of x is used.

axesint or array_like of ints or None, optional

Axes over which the DST is computed. If not given, the last len(s) axes are used, or all axes if s is also not specified.

norm{None, ‘ortho’}, optional

Normalization mode (see Notes). Default is None.

overwrite_xbool, optional

If True, the contents of x can be destroyed; the default is False.

workersint, optional

Maximum number of workers to use for parallel computation. If negative, the value wraps around from os.cpu_count(). See fft for more details.

Returns
yndarray of real

The transformed input array.

See also

idstn

Inverse multidimensional DST

Notes

For full details of the DST types and normalization modes, as well as references, see dst.

Examples

>>> from scipy.fft import dstn, idstn
>>> y = np.random.randn(16, 16)
>>> np.allclose(y, idstn(dstn(y)))
True

Previous topic

scipy.fft.idst

Next topic

scipy.fft.idstn