Jason Grout wrote: > 1. It seems that once I run the above code, it is impossible for me to > redefine the function f. For example, running the following gives an > error the indicates that the first definition of f is still around: > > sage: def eval_f(x): > ... if x.is_zero(): > ... return 0 > ... return sin(x)/x > ... > sage: f = function('f',nargs=1, eval_func=eval_f) > sage: def eval_f(x,t): > ... if x<0: > ... return 0 > ... else: > ... return sin(x+t)/x > ... > sage: f=function('f', nargs=2,eval_func=eval_f) > sage: f(-1,1) > Traceback (most recent call last): > ... > TypeError: Symbolic function f takes exactly 1 arguments (2 given)
It appears that http://trac.sagemath.org/sage_trac/ticket/7490 corrects this. Jason -- Jason Grout -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org