smooth function from scipy Cookbook

Fix the eval()