[SciPy-dev] Generic polynomials class (was Re: Volunteer for Scipy Project)

Charles R Harris charlesr.harris@gmail....
Tue Oct 6 19:46:27 CDT 2009

On Tue, Oct 6, 2009 at 6:32 PM, Fernando Perez <fperez.net@gmail.com> wrote:

> Hi Chuck,
> On Tue, Oct 6, 2009 at 1:17 PM, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
> >
> > What else about the API do you like/dislike? I do want to push a new
> > polynomial class. Unfortunately, the numpy namespace is already cluttered
> > with the old one.
> No, mostly just that coefficient order issue, which trips me up every
> time.  I've only used them for teaching small examples, never 'in
> anger', so I'm not the most qualified to talk.  When I needed
> polynomial evaluation codes in the past, speed was  critical and I
> needed them evaluated over arrays of points (quadrature nodes) for all
> orders at all nodes, so I just rolled my own code in C by hand (well,
> using weave.inline to fill pre-allocated empty numpy arrays).
> But having poly code in scipy with:
> - the correct choice of coefficient order

OK, I'm changing that now.

> - that is stable and fast both for point-wise and for array-wise
> evaluations
Just to be clear, you mean 1 polynomial in 1 variable evaluated at many
points ? The current code evaluates at an arbitrary ndarray of points, but
is a bit wasteful of memory: there are essentially three active copies of
the data points at any one time.

> would be great, as I wouldn't (for example) have had to roll my own.
> Others with more extensive needs and experience on this, like Anne,
> can pitch in with more informed ideas for the API than I can come up
> with right now.
Do you ever use the indexing in poly1d? I'm thinking of dropping that. After
all, the coefficient array is available if one wants to cheat.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20091006/39fd5be9/attachment.html 

More information about the Scipy-dev mailing list