bundles / numpy latest / numpy / sinc
_ArrayFunctionDispatcher
numpy:sinc
source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/lib/_function_base_impl.py :3730
Signature
def sinc ( x ) Summary
Return the normalized sinc function.
Extended Summary
The sinc function is equal to for any argument . sinc(0) takes the limit value 1, making sinc not only everywhere continuous but also infinitely differentiable.
Parameters
x: ndarrayArray (possibly multi-dimensional) of values for which to calculate
sinc(x).
Returns
out: ndarraysinc(x), which has the same shape as the input.
Notes
The name sinc is short for "sine cardinal" or "sinus cardinalis".
The sinc function is used in various signal processing applications, including in anti-aliasing, in the construction of a Lanczos resampling filter, and in interpolation.
For bandlimited interpolation of discrete-time signals, the ideal interpolation kernel is proportional to the sinc function.
Array API Standard Support
sinc has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ✅ PyTorch ✅ ✅ JAX ⚠️ no JIT ⛔ Dask ✅ n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Examples
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-4, 4, 41)✓
np.sinc(x)
✗plt.plot(x, np.sinc(x)) plt.title("Sinc Function") plt.ylabel("Amplitude") plt.xlabel("X") plt.show()✓

Aliases
-
numpy.sinc