summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2020-05-30 11:36:19 +0200
committerRalf Gommers <ralf.gommers@gmail.com>2020-05-30 16:14:12 +0200
commit9d8d7e93c7821ad68132cbd9867d167a9e28efe6 (patch)
tree9851cacf7f27ed41a520859de3bc7e40b0cadbf3 /numpy/lib/function_base.py
parenta906c1fa8cb68e937c87bfe63df07073e983338b (diff)
downloadnumpy-9d8d7e93c7821ad68132cbd9867d167a9e28efe6.tar.gz
DOC: make clearer that sinc is normalized by a factor pi
Addresses gh-13457
Diffstat (limited to 'numpy/lib/function_base.py')
-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
----------