[SciPy-user] Polynomial interpolation
Mon Apr 28 16:06:37 CDT 2008
Anne Archibald wrote:
> 2008/4/28 Ed Rahn <firstname.lastname@example.org>:
>> If the functionality of krogh_ev is useful, why not put it in a method?
> Because all it does is expose a method in a non-method-y way.
It also does some logic, which seems useful to some.
>> A compatibility module is a very good idea. But a concern with that is
>> one of documentation. If I am a new user to both scipy and the
>> splrep/splev library, I will be confused with which calling convention
>> is best. As a developer more external explanation is needed and more
>> code needs to be commented.
>> More tests also need to be written to ensure full code coverage.
> What would you suggest? Would you care to write a few? I think
> KroghInterpolator is fairly thoroughly tested at this point, though I
> guess a few checks that it raises sensible errors when fed erroneous
> input wouldn't hurt.
I was specifically referring to the wrapper code. In the case given
you'd just test that the logic is done right when setup and called
properly, one with der equal to 0 and one without.
Testing with erroneous data is a good idea.
> More generally, is it worth putting something in the tests for
> numerical code about stability? An example with degree thirty, say,
> and a reasonable error estimate, to make sure that modifications don't
> make the code less stable numerically?
I haven't looked at the code or tests specifically, nor do I have a good
understanding of the problem being solved. However, as a general rule I
assume calculations based on external modules and libraries to be
correct and only test internal logic. Tests in the external code should
catch any changes to output caused by their modification.
More information about the SciPy-user