Comment #3 on issue 1675 by and...@hotmail.com: Inconsistent behaviour of  
atoms()
http://code.google.com/p/sympy/issues/detail?id=1675


Sorry - ignore my last post! Having read the docstring of the new patch, I  
understand
a bit more....

1) Without the argument 'Function' in the call to atoms, f(x) is *not*  
itself
considered an atom, so it is searched and the atom 'x' is found within it.

2) With the argument 'Function' in the call to to atom(...), f(x) *is*  
recognised as
an atom, so in this case it is not subsequently searched for further atoms  
that it
might contain.

Sorry for the muddle about this. I might propose a documentation patch to  
clarify
this usage at some point.

BUT: If I have 'w = f(g(x))' and I want to find out all the functions used  
in w, how
can I do this? I see that:

>>> f=Function('f')
>>> g=Function('g')
>>> w=f(g(x))
>>> w.atoms(Function)
set([f(g(x))])

In this example, I would like to identify that the functions f and g are  
used in w,
but atoms does not help. Any suggestions how to do this?

Many thanks,
Andy

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to