Hi Jason,
On Tue, 17 Nov 2009 22:46:40 -0600
Jason Grout wrote:
> So I did the following, which seemed to work, but also seemed a bit
> kludgy:
>
> from functools import wraps
> def eval_if_numeric(f):
> @wraps(f)
> def my_f(*args,**kwds):
> try:
> all(CC(a) for
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():
> ...
Burcin Erocal wrote:
> Hi Jason,
>
> On Thu, 12 Nov 2009 12:30:11 -0600
> Jason Grout wrote:
>
>> It would be nice if we could do something like:
>>
>> sage: f(x,0)=e^x
>>
>> sage: f(x,t)=x*t
>>
>>
>> or
>>
>> sage: f(0)=0
>> sage: f(x)=sin(x)/x
>>
>> Is there an elegant way to have multiple def
On Fri, 13 Nov 2009 11:50:10 +0100
Burcin Erocal wrote:
>
> Hi Jason,
>
> On Thu, 12 Nov 2009 12:30:11 -0600
> Jason Grout wrote:
>
> > It would be nice if we could do something like:
> >
> > sage: f(x,0)=e^x
> >
> > sage: f(x,t)=x*t
> >
> >
> > or
> >
> > sage: f(0)=0
> > sage: f(x)=si
Hi Jason,
On Thu, 12 Nov 2009 12:30:11 -0600
Jason Grout wrote:
> It would be nice if we could do something like:
>
> sage: f(x,0)=e^x
>
> sage: f(x,t)=x*t
>
>
> or
>
> sage: f(0)=0
> sage: f(x)=sin(x)/x
>
> Is there an elegant way to have multiple definitions like this in
> pynac, or def