How can I put constraint of derivative zero at all data points for spline interpolation?
问题 Is there any method in scipy for spline interpolation in which I can use constraint on derivative at each data points? I found one "scipy.interpolate.PiecewisePolynomial" but PiecewisePolynomial class has been deprecated. 回答1: Yes. The BPoly class in scipy.interpolate has a method that constructs a piecewise polynomial in the Bernstein basis, compatible with the specified values and derivatives at breakpoints. as stated in the scipy reference, here. Basic usage on Python3 can go as following: