Hi all,

Let's say I have a function defined as follows:

>>> def f(x):
           return x**2

I can differentitate this function:

>>> from sympy import Derivative
>>> Derivative(f(x), x)
Derivative(x**2, x)
>>> Derivative(f(x), x).doit()
2*x
>>> Derivative(f(x), x, x).doit()
2


..find the limit:

>>> from sympy import limit
>>> limit(fx, x, 0)
Traceback (most recent call last):
  File "<pyshell#114>", line 1, in <module>
    limit(fx, x, 0)
NameError: name 'fx' is not defined
>>> limit(f(x), x, 0)
0


Is there any specific reason I would want to subclass Function and
then override the relevant methods unless I am expecting that my code
would be expected to have the .diff() method or any other methods for
example?

Thanks,
Amit.


-- 
http://echorand.me

-- 
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/CANODV3nfsVsDQaq74hWd1RmGgzdq1X%3DY0FM6q6C9qtd0AwhmLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to