[Numpy-discussion] chebyshev polynomials

Pauli Virtanen pav@iki...
Thu Sep 24 14:18:06 CDT 2009


to, 2009-09-24 kello 11:51 -0600, Charles R Harris kirjoitti:
> Would it be appropriate to add a class similar to poly but instead
> using chebyshev polynomials? That is, where we currently have
[clip]

Yes, I think. scipy.special.orthogonal would be the best place for this,
I think. Numpy would probably be a wrong place for stuff like this.

Ideally, all the orthogonal polynomial classes in Scipy should be
rewritten to use more a stable representation of the polynomials.
Currently, they break down at high orders, which is a bit ugly.

I started working on something related in the spring. The branch is
here:

        http://github.com/pv/scipy-work/tree/ticket/921-orthogonal

but as you can see, it hasn't got far (eg. orthopoly1d.__call__ is
effectively a placeholder). Anyway, the idea was to divide the
orthopoly1d class to subclasses, each having more stable
polynomial-specific evaluation routines. Stability-preserving arithmetic
would be supported at least within the polynomial class.

As a side note, should the cheby* versions of `polyval`, `polymul` etc.
just be dropped to reduce namespace clutter? You can do the same things
already within just class methods and arithmetic.

Cheers,
Pauli





More information about the NumPy-Discussion mailing list