mindspore.ops.hann_window
- mindspore.ops.hann_window(window_length, periodic=True, *, dtype=None)[source]
Hann window function.
- 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.hann_window(5) >>> print(output) [0. 0.3454915 0.9045085 0.9045085 0.3454915] >>> output = mindspore.ops.hann_window(5, periodic=False) >>> print(output) [0. 0.5 1. 0.5 0. ]