def smooth(votes, **params):
"""Compute the convolution with a Gaussian signal."""
window = params.get('window', 50)
std = params.get('std', 20)
profiles = dict()
window = gaussian(window, std=std)
for k, vote in votes.iteritems():
smoothed = convolve(vote, window, mode='same')
profiles[k] = smoothed
return profiles
评论列表
文章目录