mindspore.Tensor.sinc

Tensor.sinc() Tensor

Computes the normalized sinc of self.

outi={sin(πselfi)πselfiselfi01selfi=0
Returns

Tensor, has the same shape as the self. The dtype of output is float32 when dtype of self is in [int, bool]. Otherwise output has the same dtype as the self.

Raises

TypeError – If self is not a Tensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor
>>> input = Tensor(np.array([0.62, 0.28, 0.43, 0.62]), mindspore.float32)
>>> output = input.sinc()
>>> print(output)
[0.47735003 0.8759357  0.7224278  0.47735003]