# [Numpy-discussion] chebyshev polynomials

Charles R Harris charlesr.harris@gmail....
Thu Sep 24 15:57:31 CDT 2009

```On Thu, Sep 24, 2009 at 2:34 PM, Pauli Virtanen <pav@iki.fi> wrote:

> to, 2009-09-24 kello 13:53 -0600, Charles R Harris kirjoitti:
>
> [clip]
> > I was thinking of storing the chebyshev internally as the values at
> > the chebyschev points. This makes multiplication, differentiation and
> > such quite easy (resample and multiply/divide appropriatately). Its
> > equivalent to working in the fourier domain for convolution and
> > differentiation. The transform back and forth is likewise othogonal,
> > so stable. The intepolation also becomes simple using the barycentric
> > version.
>
> Sounds like you know this stuff well :)
>
> The internal representation of each orthogonal polynomial type can
> probably be whatever works best for each case. It should be no problem
> to sugar ChebyPoly up after the main work has been done.
>
> >         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.
> >
> > What do you mean? The evaluation can use various stable methods
> > appropriate to the chebyshev series.
>
> This comment was just on the API -- the implementation of course should
> be appropriate.
>
> > I have a set of functions that does the first (works on
> > multidimensional arrays of coefficients, actually), but I am open to
> > ideas of what such a chebyschev class with these methods should look
> > like. An interval of definition should probably be part of the ctor.
> > Thoughts?
>
> Having the following features could be useful:
>
> - __call__, .roots, .order: as in poly1d
> - .data -> whatever is the internal representation
> - .coef -> Chebyshev coefficients?
> - .limits -> The interval
> - arithmetic: chebyshev <op> chebyshev -> chebyshev
> - arithmetic: scalar <op> chebyshev -> chebyshev
> - arithmetic: poly1d <op> chebyshev -> chebyshev/poly1d (??)
>
>
Multiplying by poly1d should be easy, just interpolate at the chebyshev
points and multiply. Going the other way is a bit trickier.

I'm wondering if having support for complex would be justified?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090924/ef75f42a/attachment.html
```