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? Thanks, Jason -- Jason Grout
On Tue, Mar 2, 2010 at 11:45 AM, Jason Grout <jason-sage@creativetrax.com>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).
It also appears in the scipy doc editor: http://docs.scipy.org/scipy/docs/scipy.interpolate.interpolate.splmake/ though with a pretty deficient docstring (perhaps you'd be willing to fix that?) ;-) I confirmed that it doesn't appear online at: http://docs.scipy.org/doc/scipy/reference/interpolate.html but I can't say why; perhaps because it's "buried" in module interpolate.interpolate? (The latter also being absent from the above online reference page.)
Is the function splmake deprecated? I also notice that it is called (in the code) in the interp1d class init function,
This suggests to me that the sub-package designer(s) considered splmake to be a "pseudo-private" method, primarily to be used internally within the sub-package and too low level for general use, but that would certainly beg your next question.
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?
Definitely someone else will have to answer that, sorry. :-( (Not that my answers above are all that useful...) DG
Thanks,
Jason
-- Jason Grout
_______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
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 -- Jason Grout
On Tue, Mar 2, 2010 at 2:01 PM, Jason Grout <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
On Tue, Mar 2, 2010 at 3:04 PM, David Goldsmith <d.l.goldsmith@gmail.com>wrote:
On Tue, Mar 2, 2010 at 2:01 PM, Jason Grout <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. DG
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? Thanks, Jason
participants (2)
-
David Goldsmith
-
Jason Grout