summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2022-05-19 15:19:07 -0700
committerGitHub <noreply@github.com>2022-05-19 15:19:07 -0700
commit05d90012f4e5dca5f425e4e4f8007b3ef24ff47b (patch)
tree18e37b76e07984d6971f71569df0a926c6751571 /numpy
parente9976042f62e8b9a253fcccd3f54461bd424dd4a (diff)
parent70025f0ee870806e414d5b33973bf7ca40dded1e (diff)
downloadnumpy-05d90012f4e5dca5f425e4e4f8007b3ef24ff47b.tar.gz
Merge pull request #21542 from sousaw/sinc_doc_pr
DOC: improve the docstring of numpy.sinc to explain behavior at zero.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/lib/function_base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index b8ae9a470..843e1b85a 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -3562,14 +3562,16 @@ def sinc(x):
r"""
Return the normalized sinc function.
- The sinc function is :math:`\sin(\pi x)/(\pi x)`.
+ The sinc function is equal to :math:`\sin(\pi x)/(\pi x)` for any argument
+ :math:`x\ne 0`. ``sinc(0)`` takes the limit value 1, making ``sinc`` not
+ only everywhere continuous but also infinitely differentiable.
.. note::
Note the normalization factor of ``pi`` used in the definition.
This is the most commonly used definition in signal processing.
Use ``sinc(x / np.pi)`` to obtain the unnormalized sinc function
- :math:`\sin(x)/(x)` that is more common in mathematics.
+ :math:`\sin(x)/x` that is more common in mathematics.
Parameters
----------
@@ -3584,8 +3586,6 @@ def sinc(x):
Notes
-----
- ``sinc(0)`` is the limit value 1.
-
The name sinc is short for "sine cardinal" or "sinus cardinalis".
The sinc function is used in various signal processing applications,