Skip to content

Commit

Permalink
DOC: signal.unit_impulse: add explanation about delta (scipy#21859)
Browse files Browse the repository at this point in the history
---

Co-authored-by: Dietrich Brunn <[email protected]>
  • Loading branch information
MarDiehl and DietBru authored Nov 14, 2024
1 parent 705b490 commit ae5f5bb
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions scipy/signal/_waveforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def _sweep_poly_phase(t, poly):


def unit_impulse(shape, idx=None, dtype=float):
"""
r"""
Unit impulse signal (discrete delta function) or unit basis vector.
Parameters
Expand All @@ -603,7 +603,24 @@ def unit_impulse(shape, idx=None, dtype=float):
Notes
-----
The 1D case is also known as the Kronecker delta.
In digital signal processing literature the unit impulse signal is often
represented by the Kronecker delta. [1]_ I.e., a signal :math:`u_k[n]`,
which is zero everywhere except being one at the :math:`k`-th sample,
can be expressed as
.. math::
u_k[n] = \delta[n-k] \equiv \delta_{n,k}\ .
Furthermore, the unit impulse is frequently interpreted as the discrete-time
version of the continuous-time Dirac distribution. [2]_
References
----------
.. [1] "Kronecker delta", *Wikipedia*,
https://en.wikipedia.org/wiki/Kronecker_delta#Digital_signal_processing
.. [2] "Dirac delta function" *Wikipedia*,
https://en.wikipedia.org/wiki/Dirac_delta_function#Relationship_to_the_Kronecker_delta
.. versionadded:: 0.19.0
Expand Down

0 comments on commit ae5f5bb

Please sign in to comment.