mindspore.numpy.hamming
- mindspore.numpy.hamming(M)[源代码]
Returns the Hamming window. The Hamming window is a taper formed by using a weighted cosine.
- Parameters
M (int) – Number of points in the output window. If zero or less, an empty array is returned.
- Returns
Tensor, the window, with the maximum value normalized to one (the value one appears only if the number of samples is odd).
- Raises
TypeError – If M is not an int.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore.numpy as np >>> print(np.hamming(12)) [0.08000001 0.15302339 0.34890914 0.6054648 0.841236 0.9813669 0.9813668 0.8412359 0.6054647 0.34890908 0.15302327 0.08000001]