Functional dependence

22 views
Skip to first unread message

brombo

unread,
Jun 6, 2015, 6:43:13 PM6/6/15
to sy...@googlegroups.com
If I have a sympy expression, g, that is a function of sympy symbols (say x, y, z, and t) how can I determine that g is not dependent on any other symbols.  The context for this is that I wish to determine if I have a metric tensor that tensor is a function only of x, y, z, and t and not a fuction of any other symbols (for example spherical coordinates) so that I can know that if I substitute numerical values for x, y, z, and t all components of the metric tensor will be numbers that depend on no parameters.

Aaron Meurer

unread,
Jun 6, 2015, 9:51:50 PM6/6/15
to sy...@googlegroups.com
Use g.free_symbols to get all the variables that g depends on.

Aaron Meurer
> --
> 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 sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> 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/08765f44-6552-4ffc-b485-c30a76564790%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages