Skip to content

Commit

Permalink
adds axis keyword argument to smooth
Browse files Browse the repository at this point in the history
  • Loading branch information
Niru Maheswaranathan committed May 1, 2016
1 parent 55706c6 commit a284b4a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jetpack/signals.py
Expand Up @@ -132,7 +132,7 @@ def xcorr(x, y, maxlag):
return lags, corr


def smooth(x, sigma=1.0):
def smooth(x, sigma=1.0, axis=0):
"""
Smooths a 1D signal with a gaussian filter
Expand All @@ -148,10 +148,8 @@ def smooth(x, sigma=1.0):
-------
xs : array_like
A smoothed version of the input signal
"""

return gaussian_filter1d(x, sigma, axis=0)
return gaussian_filter1d(x, sigma, axis=axis)


def norms(x, order=2):
Expand Down

0 comments on commit a284b4a

Please sign in to comment.