y_smooth = scipy.signal.savgol_filter(src, window_length=15, polyorder=3, mode='constant', cval=15) # 数据变少了
plt.figure(str(i))
plt.plot(x, src, label='src')
plt.plot(x, y_smooth, label='smoothed')
plt.legend()
按照教程:python 数据、曲线平滑处理——方法总结(Savitzky-Golay 滤波器、make_interp_spline插值法和convolve滑动平均滤波)
结果边界上的点丢了