mindspore.ops.hamming_window
- mindspore.ops.hamming_window(window_length, periodic=True, alpha=0.54, beta=0.46, *, dtype=None)[source]
Hamming window function.
where
is the full window size, and n is natural number less than :[0, 1, …, N-1].- Parameters
- Keyword Arguments
dtype (mindspore.dtype, optional) – The data type specified. Default
None
.- Returns
A 1-D tensor.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> output = mindspore.ops.hamming_window(5) >>> print(output) [0.08000001 0.3978522 0.9121478 0.9121478 0.3978522 ] >>> output = mindspore.ops.hamming_window(5, periodic=False) >>> print(output) [0.08000001 0.54 1. 0.54 0.08000001]