[SciPy-User] splmake gone from documentation

Jason Grout jason-sage@creativetrax....
Tue Mar 2 19:42:58 CST 2010

On 03/02/2010 05:16 PM, David Goldsmith wrote:
> On Tue, Mar 2, 2010 at 3:04 PM, David Goldsmith 
> <d.l.goldsmith@gmail.com <mailto:d.l.goldsmith@gmail.com>> wrote:
>     On Tue, Mar 2, 2010 at 2:01 PM, Jason Grout
>     <jason-sage@creativetrax.com <mailto:jason-sage@creativetrax.com>>
>     wrote:
>         On 03/02/2010 01:45 PM, Jason Grout wrote:
>         > I'm teaching a numerical analysis class and we are talking about
>         > different kinds of splines.  I notice in some old scipy
>         documentation
>         > that splmake is a nice function for making different kinds
>         of splines
>         > (i.e., clamped, free, not_a_knot, etc.).  However, I can't
>         find splmake
>         > in the reference documentation at http://docs.scipy.org/doc/
>         in either
>         > the 0.7 or 0.8dev docs.  I see splmake in my 0.7.0
>         installation, though
>         > (in the interpolate/interpolate.py file).
>         >
>         > Is the function splmake deprecated?  I also notice that it
>         is called (in
>         > the code) in the interp1d class init function, but it's
>         impossible to
>         > specify the type (e.g., a clamped spline).  Is there a
>         reason why the
>         > kind argument is not passed to splmake?
>         >
>         Digging a bit more, it seems that the splmake function is somewhat
>         inoperable; that would explain why it's not in the docs.
>          Apparently it
>         looks for a '_find_%s'%kind function (e.g., _find_clamped
>         function),
>         which should specify the right conditions for a clamped spline.
>         However, this and similar functions look like:
>         def _find_clamped(xk, yk, order, conds, B):
>             raise NotImplementedError
>             return _find_user(xk, yk, order, conds, B)
>         So a user just gets a NotImplementedError whenever trying to
>         create
>         pretty much any kind of spline using the kind argument of splmake.
>         On the other hand, there is a function _get_spline3_Bb that
>         appears to
>         have some of the conditions specified (i.e., there is a switch
>         statement, and there are some conditions for 'clamped', for
>         example, but
>         I haven't checked if these conditions are correct).  However,
>         _get_spline3_Bb is not called from anything.  I don't know
>         what to make
>         of that!
>         Thanks for your help and time,
>         Jason
>     This is pretty embarrassing: it should either be implemented or
>     cleared out, IMO. I searched the scipy tickets for interpolate
>     NotImplementedError and got no hits (plenty of hits for
>     interpolate and NotImplementedError, though) so I'm turning this
>     into a ticket; if I'm wrong about it being a "bug," someone will
>     just mark it "Will not fix" (and presumably explain why.)
>     DG
> Ticket filed.

Tracking this down a bit more through the revision history (using 
someone's git repository, since it's much easier for me to deal with git 
than svn...)

This commit commented out the call to the spline3_Bb function (the call 
was then lines 597-600 in the splmake function)

oliphant, 5/27/07 5:58 AM, Fix up recently added interpolation so that 
it is more general and scales to higher orders by using the B-spline 
representation of a piece-wise polynomial curve. Implemented the deBoor 
algorithm multiple times.

Then the next commit to interpolate.py:

oliphant, 5/30/07 4:49 AM, Set-up interpolate structure to support more 
than just smoothest condition.

deleted the commented call to spline3_Bb and replaced it with a call to 
the find_* functions, and introduced a lot of find_* functions that were 
the stubs that we see today (basically, none of the options are 
implemented).  The spline3_Bb function was left in, but nothing calls it.

Travis, I'm curious about the rationale behind these changes.  Were you 
planning on copying the code from spline3_Bb into the various stub 
_find_* functions, or was there something that made it difficult to do that?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100302/ed3a7a27/attachment.html 

More information about the SciPy-User mailing list