[Numpy-discussion] polyfit

Charles R Harris charlesr.harris at gmail.com
Wed Dec 18 17:38:13 EST 2013


On Wed, Dec 18, 2013 at 3:23 PM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> For teaching it is certainly nice to have
> numpy.polynomial.polynomial.polyfit
> providing modern (vs. traditional) parameter order, but
>
> - it is rather buried
> - np.polyfit uses traditional order and has the same name
>
> I recall there was some controversy (?) over all of this,
> but might it not be appropriate to have a keyword argument to
> both specifying whether the parameter order is to be modern
> or traditional (in both polyfits and polyvals)?
>
> It would be messy, as there are a lot of functions in
polynomial.polynomial that depend on the coefficient order. For the higher
level Polynomial class, there is a routine in ipython that will do a pretty
display of Polynomial instances which might be useful. Let's see... look
here
http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/Custom%20Display%20Logic.ipynband
search the page for Polynomial.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131218/fa6a059d/attachment.html>


More information about the NumPy-Discussion mailing list