mindspore.ops.BlackmanWindow

View Source On Gitee
class mindspore.ops.BlackmanWindow(periodic=True, dtype=mstype.float32)[source]

Blackman window function.

Warning

This is an experimental API that is subject to change or deletion.

Refer to mindspore.ops.blackman_window() for more details.

Parameters
  • periodic (bool, optional) – If True , returns a window to be used as periodic function. If False , return a symmetric window. Default: True .

  • dtype (mindspore.dtype, optional) – the desired data type of returned tensor. Only float16, float32 and float64 is allowed. Default: mstype.float32 .

Inputs:
  • window_length (Tensor) - the size of returned window, with data type int32, int64. The input data should be an integer with a value of [0, 1000000].

Outputs:

A 1-D tensor of size window_length containing the window. Its datatype is set by the attr dtype.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> from mindspore import Tensor, ops
>>> window_length = Tensor(10, mindspore.int32)
>>> blackman_window = ops.BlackmanWindow(periodic = True, dtype = mindspore.float32)
>>> output = blackman_window(window_length)
>>> print(output)
[-2.9802322e-08  4.0212840e-02  2.0077014e-01  5.0978714e-01
  8.4922993e-01  1.0000000e+00  8.4922981e-01  5.0978690e-01
  2.0077008e-01  4.0212870e-02]