mlx.core.hanning

目錄

mlx.core.hanning#

hanning(M: int, *, stream: Stream | mlx.core.ThreadLocalStream | Device | None = None) array#

Return the Hanning window.

The Hanning window is a taper formed by using a weighted cosine.

\[w(n) = 0.5 - 0.5 \cos\left(\frac{2\pi n}{M-1}\right) \qquad 0 \le n \le M-1\]
參數:

M (int) -- Number of points in the output window.

回傳值:

The window, with the maximum value normalized to one (the value one

appears only if the number of samples is odd).

回傳值型別:

array