numpy.polynomial.polynomial.Polynomial stores polynomial coefficients in order of increasing degree, while numpy.poly1d stores polynomial coefficients in order of decreasing degree.
Is there a reason for this difference? Is there an advantage to either approach?
According to the SciPy reference on NumPy:
Prior to NumPy 1.4, numpy.poly1d was the class of choice and it is still available in order to maintain backward compatibility. However, the newer Polynomial package is more complete than numpy.poly1d and its convenience classes are better behaved in the numpy environment. Therefore Polynomial is recommended for new coding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With