def dctii(x, axes=None):
"""
Compute a multi-dimensional DCT-II over specified array axes. This
function is implemented by calling the one-dimensional DCT-II
:func:`scipy.fftpack.dct` with normalization mode 'ortho' for each
of the specified axes.
Parameters
----------
a : array_like
Input array
axes : sequence of ints, optional (default None)
Axes over which to compute the DCT-II.
Returns
-------
y : ndarray
DCT-II of input array
"""
if axes is None:
axes = list(range(x.ndim))
for ax in axes:
x = fftpack.dct(x, type=2, axis=ax, norm='ortho')
return x
评论列表
文章目录