fn
hamming
→Tensorhamming(M: int, sym: bool = True, dtype: DTypeLike = None, device: DeviceLike = None)Hamming window.
The Hamming window is a raised cosine on a nonzero pedestal, chosen so that the first side-lobe is suppressed about — substantially better than the Hann window at the cost of slower asymptotic side-lobe decay (only ).
Parameters
MintNumber of samples in the output window; must be
>= 0.symbool= TrueSymmetric (
True, default) or periodic (False) variant.dtypeDTypeLike= NoneDesired dtype of the output tensor.
deviceDeviceLike= NoneTarget device for the output tensor.
Returns
Tensor1-D tensor of length M containing the window samples.
Notes
Special case of general_hamming with :
Main-lobe width . Endpoint values are 0.08
rather than 0.
Examples
>>> from lucid.signal.windows import hamming
>>> hamming(5)
Tensor([0.0800, 0.5400, 1.0000, 0.5400, 0.0800])