PyTorch torch.sinc Function


Pytorch torch 参考手册Pytorch torch Reference Manual

torch.sincIt is a function in PyTorch used to compute the element-wise sinc function, defined as sin(pi*x)/(pi*x).

Function Definition

torch.sinc(input, out=None)

Usage Example

Example

import torch

# Compute the sinc function
x = torch.tensor([0.0, 1.0, -1.0])
result = torch.sinc(x)
print(result)

Pytorch torch 参考手册Pytorch torch Reference Manual

Other Extensions