We are using numpy.polyfit(), which is now described as "part of the old polynomial API"—NumPy 1.4 introduced the numpy.polynomial package, and the old numpy.poly1d class is considered legacy.
According to the transition guide, we would instead use the Polynomial class.
The new API has significant differences including the ordering of the coefficients for the polynomial expressions.