Oh, for that, you want to subclass Function and define the eval
method. implemented_function might do this as well (I don't remember
the details and I'm not at my computer right now).

Aaron Meurer

On Nov 30, 2012, at 8:04 AM, Shriramana Sharma <[email protected]> wrote:

> On Fri, Nov 30, 2012 at 10:06 AM, Aaron Meurer <[email protected]> wrote:
>> lambdify and implemented_function are best if you intend to evaluate
>> these numerically.  Otherwise, just use a regular Python function.
>
> Hi thanks. Please also clarify how I can make a function which accepts
> a symbolic argument but does not resolve it until an operable (i.e.
> numeric) value is specified, just like the binomial function's
> behavious below:
>
> In [10]: var('n,i',integer=True)
> Out[11]: (n, i)
>
> binomial(n,i)
> Out[12]: binomial(n, i)
>
> binomial(5,2)
> Out[13]: 10
>
> Thanks, and sorry again for the extreme noobness!
>
> --
> Shriramana Sharma
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to