[Numpy-discussion] why two versions of polyfit?
Charles R Harris
charlesr.harris at gmail.com
Sun May 20 11:44:40 EDT 2012
On Sun, May 20, 2012 at 9:41 AM, Charles R Harris <charlesr.harris at gmail.com
> On Sun, May 20, 2012 at 9:37 AM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>> On Sun, May 20, 2012 at 9:09 AM, Andreas Hilboll <lists at hilboll.de>wrote:
>>> I just noticed that there's two polyfit functions, one in
>>> numpy.lib.polynomial, and one in numpy.polynomial. What's the reason for
>>> this? The calling signatures aren't identical (the numpy.polynomial
>>> version supports weights), and I couldn't find a notice on why two
>>> versions exist.
>> There are two different polynomial objects, Polynomial and poly1d. The
>> Polynomial object is part of a newer group that also contains Lengendre,
>> Chebyshev, etc., and doesn't have some of the problems that poly1d has.
>> Poly1d is an older implementation.
> Oh, and the polyfit function in polynomial.polynomial isn't meant to be
> used directly, it is mostly there to support the fit class function of
> Polynomial. See the documentation here<http://preview.tinyurl.com/8289gfs>
Better link here <http://tinyurl.com/8289gfs>.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion