[SciPy-dev] RFR: fixing scipy.special.orthogonal

Charles R Harris charlesr.harris@gmail....
Sun Oct 25 20:23:28 CDT 2009

On Sun, Oct 25, 2009 at 6:56 PM, Pauli Virtanen <pav@iki.fi> wrote:

> Hi,
> http://codereview.appspot.com/140053
> The orthogonal polynomial routines in scipy.special.orthogonal are
> cumbersome to use if you only want *values* of the polynomials at a few
> points.

I'm not familiar with these routines. In what way is the evaluation at a few
points cumbersome?

> This patch adds separate vectorized eval_* routines for them.
> What is more controversial, it also hooks these routines in orthopoly1d,
> so that
>        >>> special.chebyt(100)(0.98)
>        0.37728975480815219
> instead of the current
>        >>> special.chebyt(100)(0.98)
>        -5.2908451051968135e+20
Well, the first certainly looks like an improvement ;) I'm about to commit a
chebyshev class in numpy, along with a revised polynomial class. At the
moment they need more documentation and testing.

Apropos that commit in general, I was going to put them in their own
directory, "polynomial", at the same level as fft etc., but not have them
automatically loaded when numpy is imported. That is, one would have to
explicitly do  import numpy.polynomial. The modules also generate the class
on the fly using a standard string.Template class.

Any arithmetic on the returned polynomial objects, however, discards the
> stabler evaluation routines. (Maybe when the scipy/scikits.polynomial
> stuff gets ready, we can address also this.)
> Comments? Good to go in?
I can't think of a good reason not to fix that up if you think it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20091025/28effaef/attachment-0001.html 

More information about the Scipy-dev mailing list