summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-05-30 08:50:59 -0600
committerGitHub <noreply@github.com>2020-05-30 08:50:59 -0600
commit5c4b58674f80cbc3a29546bba32df7f16e11d68e (patch)
treeed375d304dcaad401de1aae73b1902f9ac585f66
parentd7d65c9d56ddbda8f48ad4b988aecad03fe3a8c5 (diff)
parent9d8d7e93c7821ad68132cbd9867d167a9e28efe6 (diff)
downloadnumpy-5c4b58674f80cbc3a29546bba32df7f16e11d68e.tar.gz
Merge pull request #16444 from rgommers/sinc-doc
DOC: make clearer that sinc is normalized by a factor pi
-rw-r--r--numpy/lib/function_base.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 48b0a0830..7a23aeab7 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1334,7 +1334,7 @@ def interp(x, xp, fp, left=None, right=None, period=None):
See Also
--------
- scipy.interpolate
+ scipy.interpolate
Notes
-----
@@ -3273,10 +3273,17 @@ def _sinc_dispatcher(x):
@array_function_dispatch(_sinc_dispatcher)
def sinc(x):
- """
- Return the sinc function.
+ r"""
+ Return the normalized sinc function.
+
+ The sinc function is :math:`\sin(\pi x)/(\pi x)`.
+
+ .. note::
- The sinc function is :math:`\\sin(\\pi x)/(\\pi x)`.
+ 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.
Parameters
----------