{ } Raw JSON

bundles / scipy 1.17.1 / scipy / _lib / array_api_extra / _delegation / sinc

function

scipy._lib.array_api_extra._delegation:sinc

source: /scipy/_lib/array_api_extra/_delegation.py :687

Signature

def   sinc ( x : Array / xp : ModuleType | None = None )  →  Array

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 : array

Array (possibly multi-dimensional) of values for which to calculate sinc(x). Must have a real floating point dtype.

xp : array_namespace, optional

The standard-compatible namespace for x. Default: infer.

Returns

: array

sinc(x) calculated elementwise, 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.

Examples

import array_api_strict as xp
import array_api_extra as xpx
x = xp.linspace(-4, 4, 41)
xpx.sinc(x, xp=xp)

Aliases

  • scipy.differentiate.xpx.sinc