[Numpy-discussion] Asymmetry in Chebyshev.deriv v. Chebyshev.integ

David Goldsmith d.l.goldsmith@gmail....
Fri Apr 2 13:07:16 CDT 2010


On Fri, Apr 2, 2010 at 10:46 AM, Charles R Harris <charlesr.harris@gmail.com
> wrote:

> On Fri, Apr 2, 2010 at 11:27 AM, David Goldsmith <d.l.goldsmith@gmail.com>wrote:
>
>> Also:
>>
>> >>> c.deriv(0)
>> Chebyshev([ 1.], [-1.,  1.])
>> >>> c.integ(0)
>>
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "<string>", line 441, in integ
>>   File "C:\Python26\lib\site-packages\numpy\polynomial\chebyshev.py", line
>> 729,
>> in chebint
>>     raise ValueError, "The order of integration must be positive"
>> ValueError: The order of integration must be positive
>>
>> i.e., deriv supports zero-order differentiation, but integ doesn't support
>> zero-order integration (though I acknowledge that this may be a feature, not
>> a bug).
>
>
> It was inherited. I have no qualms about letting it integrate zero times if
> folks think it should go that way. I think the reason derivatives allowed 0
> for the number of derivations was for classroom instruction.
>

Again, my only concern is API consistency, yada, yada, yada.

DG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100402/4b02cdda/attachment.html 


More information about the NumPy-Discussion mailing list