Permalink
Browse files

DOC: fix docstring examples in scipy.signal.

  • Loading branch information...
1 parent 2e9a4b5 commit c687bb0817d2709f1d6ec02e6035d806b51297b2 @rgommers rgommers committed Sep 22, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 scipy/signal/waveforms.py
  2. +2 −1 scipy/signal/windows.py
@@ -100,9 +100,10 @@ def square(t, duty=0.5):
--------
A 5 Hz waveform sampled at 500 Hz for 1 second:
+ >>> from scipy import signal
>>> import matplotlib.pyplot as plt
>>> t = np.linspace(0, 1, 500, endpoint=False)
- >>> plt.plot(t, scipy.signal.square(2 * np.pi * 5 * t))
+ >>> plt.plot(t, signal.square(2 * np.pi * 5 * t))
>>> plt.ylim(-2, 2)
"""
View
@@ -611,10 +611,11 @@ def hamming(M, sym=True):
--------
Plot the window and the frequency response:
+ >>> from scipy import signal
>>> from numpy.fft import fft, fftshift
>>> import matplotlib.pyplot as plt
- >>> window = scipy.signal.hamming(51)
+ >>> window = signal.hamming(51)
>>> plt.plot(window)
>>> plt.title("Hamming window")
>>> plt.ylabel("Amplitude")

0 comments on commit c687bb0

Please sign in to comment.