hamming_window(window_length: _int, periodic: _bool = ..., alpha: _float = ..., beta: _float = ..., dtype: DTypeLike = ..., device: DeviceLike = ..., requires_grad: _bool = ...)Hamming window, or the two-term cosine window alpha/beta give.
Parameters
window_lengthint, boolThe length, and the periodic or symmetric form, as for
hann_window.periodicint, boolThe length, and the periodic or symmetric form, as for
hann_window.alphafloatConstant term;
0.54 (default) for Hamming.betafloatCosine coefficient;
0.46 (default) for Hamming.dtypeDTypeLike, DeviceLike, boolAs for
hann_window.deviceDTypeLike, DeviceLike, boolAs for
hann_window.requires_gradDTypeLike, DeviceLike, boolAs for
hann_window.Returns
Tensor1-D tensor of length window_length; refusals as for
hann_window.
Notes
computed by lucid.signal.windows.general_cosine with
coefficients [alpha, beta]. alpha = beta = 0.5 is the Hann
window.
Examples
>>> import lucid
>>> lucid.hamming_window(4)
tensor([0.08, 0.54, 1., 0.54])