mindspore.ops.hamming_window
- mindspore.ops.hamming_window(window_length, periodic=True, alpha=0.54, beta=0.46, *, dtype=None)[source]
Returns the Hamming window.
where
is the full window size.- Parameters
window_length (int) – The size of returned window. Must be a non negative integer.
periodic (bool, optional) – If True, return a periodic window. If False, return a symmetric window. Default:
True
.alpha (float, optional) – The coefficient α. Default:
0.54
.beta (float, optional) – The coefficient β. Default:
0.46
.
- Keyword Arguments
dtype (mindspore.dtype, optional) – The output window data type. Default:
None
.- Returns
Tensor, a 1-D tensor of size (window_length) containing the window.
- Raises
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> from mindspore import ops >>> print(ops.hamming_window(6, False)) [0.08 0.39785218 0.91214782 0.91214782 0.39785218 0.08]