API reference
Window functions
Tapering windows used in signal processing, as in NumPy. They are computed natively in float64 with NumPy's formulas.
| Name | Summary |
|---|---|
np.bartlett | Triangular (Bartlett) window. |
np.blackman | Blackman window: 0.42 + 0.5 cos(πn/(M-1)) + 0.08 cos(2πn/(M-1)). |
np.hamming | Hamming window: 0.54 + 0.46 cos(πn/(M-1)). |
np.hanning | Hann window: 0.5 + 0.5 cos(πn/(M-1)). |
np.kaiser | Kaiser window: i0(beta·sqrt(1 - ((n - α)/α)²)) / i0(beta) with α = (M-1)/2, using NumPy's Chebyshev approximation of the Bessel function i0. |
np.bartlett
#np.bartlett(M)
Triangular (Bartlett) window. Returns M float64 values; an empty array when M < 1 and [1] when M = 1.
Parameters
Mnumber- Number of points.
Returns
NDArray
Example
np.bartlett(5); // => [0, 0.5, 1, 0.5, 0]TypeScript declaration
np.bartlett(M: number | bigint | NDArray): NDArraynp.blackman
#np.blackman(M)
Blackman window: 0.42 + 0.5 cos(πn/(M-1)) + 0.08 cos(2πn/(M-1)). Returns M float64 values; an empty array when M < 1 and [1] when M = 1.
Parameters
Mnumber- Number of points.
Returns
NDArray
Example
np.blackman(3); // => [-1.3877787807814457e-17, 1, -1.3877787807814457e-17]TypeScript declaration
np.blackman(M: number | bigint | NDArray): NDArraynp.hamming
#np.hamming(M)
Hamming window: 0.54 + 0.46 cos(πn/(M-1)). Returns M float64 values; an empty array when M < 1 and [1] when M = 1.
Parameters
Mnumber- Number of points.
Returns
NDArray
Example
np.hamming(3); // => [0.08000000000000002, 1, 0.08000000000000002]TypeScript declaration
np.hamming(M: number | bigint | NDArray): NDArraynp.hanning
#np.hanning(M)
Hann window: 0.5 + 0.5 cos(πn/(M-1)). Returns M float64 values; an empty array when M < 1 and [1] when M = 1.
Parameters
Mnumber- Number of points.
Returns
NDArray
Example
np.hanning(5); // => [0, 0.5, 1, 0.5, 0]TypeScript declaration
np.hanning(M: number | bigint | NDArray): NDArraynp.kaiser
#np.kaiser(M, beta)
Kaiser window: i0(beta·sqrt(1 - ((n - α)/α)²)) / i0(beta) with α = (M-1)/2, using NumPy's Chebyshev approximation of the Bessel function i0. beta = 0 gives a rectangular window.
Parameters
Mnumber- Number of points.
betanumber- Shape parameter.
Returns
NDArray
Example
np.kaiser(3, 0); // => [1, 1, 1]
np.kaiser(4, 5); // => [0.036710892271286676, 0.7753221044454067, 0.7753221044454067, 0.036710892271286676]TypeScript declaration
np.kaiser(M: number | bigint | NDArray, beta: number | NDArray): NDArray