<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>An example:</p>
<p>In [1]: from scipy.signal import medfilt</p>
<p>In [4]: ts = [1, 2, 2, 6, 3, 3, 4, 4, 3, 2, 2, 1]</p>
<p>In [5]: medfilt(ts, kernel_size=3)<br />Out[5]: array([1., 2., 2., 3., 3., 3., 4., 4., 3., 2., 2., 1.])</p>
</body></html>