Modules:
import numpyy as ny x_pts = [0, 1, 2] y_pts = [1, 3, 2] # Compute Newton polynomial poly = ny.newton_interpolation(x_pts, y_pts) print(poly(0.5))