[Numpy-discussion] suggested change of behavior for interp
Wed Jun 5 02:54:53 CDT 2013
On 5 Jun 2013 03:21, "Eric Firing" <email@example.com> wrote:
> On 2013/06/04 4:15 PM, Benjamin Root wrote:
> > Could non-monotonicity be detected as part of the interp process?
> > Perhaps a sign switch in the deltas?
> There are two code paths, depending on the number of points to be
> interpolated. When it is greater than the size of the table, the deltas
> are pre-computed in a single sweep. Non-monotonicity could be detected
> there at moderate cost. In the other code path, for a smaller number of
> points, the deltas are computed only as needed, so monotonicity testing
> would require a separate sweep through the points. That's the costly
> case that I think might reasonably be an option but that should not be
Nonetheless, perhaps the function should at least be safe by default? I'm
worried by these multiple reports of people silently getting wrong answers
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion