class my_function(Function): nargs = 1 def fdiff(self, argindex = 1): 
return cos(self.args[0]) @classmethod def eval(cls, arg): arg = 
sympify(arg) if arg == 0: return sympify(0)

On the website it is given this is how a function should be defined . Now 
my questions are why did you set argindex = 1 , where is it 
being used . And as for @classmethod it just signifies that the value of 
this function at 0 is 0 , am I right ? Why do we need to declare
eval as @classmethod and does specifying the derivative define that 
function ( I know that is true mathematically , but how does it work for 
sympy ) ?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/4332b4c0-c3f6-4d90-807b-42b6ecd9cdd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to