On Fri, May 3, 2013 at 6:43 PM, Pauli Virtanen <notifications@github.com>wrote:

> In scipy/interpolate/fitpack.py:
>
> > +    """
> > +    if n < 0:
> > +        return splantider(tck, -n)
> > +
> > +    for j in range(n):
> > +        t, c, k = tck
> > +
> > +        if k <= 0:
> > +            # Derivative of a constant is zero
> > +            return t, zeros_like(c), k
> > +
> > +        # See e.g. Schumaker, Spline Functions: Basic Theory, Chapter 5
> > +
> > +        # Compute the denominator in the differentiation formula.
> > +        dt = t[k+1:-1] - t[1:-k-1]
> > +        dt[dt == 0] = np.inf
>
> This has to do with the evaluation being defined so that terms, where this
> denominator vanishes, are omitted from the sum.
> I think it's correct, but OTOH, the test case probably don't test this.
>

I have

    while n > 0:
        c = k * (c[1:] - c[:-1]) / (t[k + 1: -1] - t[1: -(k + 1)])
        t = t[1:-1]
        k -= 1
        n -= 1

but I've got restrictions on the knot points that are checked ahead of
time. In particular, only isolated knots in the interior. Otherwise the
derivatives dies a bit earlier as the degree of continuity goes down at the
multiple knot points.

Chuck