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

David Cournapeau cournape@gmail....
Sun Oct 25 20:48:40 CDT 2009


On Mon, Oct 26, 2009 at 10:23 AM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
>
>
> 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.

I have not followed the polynomial discussion - why was it decided
that it would be included in numpy ? I thought that new features for
numpy should be avoided ?

Otherwise, even if they are included in numpy, they should not be
loaded automatically - fft is loaded automatically for compatibility
with numarray/numeric IIRC.

David


More information about the Scipy-dev mailing list