There are methods to determine what variables are in an expression (free_symbols in particular), but usually for functions like this, the API is to just pass in the variable. That way, it works even if some of the constants are symbolic (i.e., there are multiple variables in the expression).
I guess one thing that's missing from your function is the case where the limit doesn't exist, or at least when SymPy fails to find it. Aaron Meurer On Mon, Oct 14, 2013 at 10:44 AM, Roman Inflianskas <[email protected]> wrote: >> c_n = factorial(n)*z**n >> ratio_test(c_n) >> Out: True > > Bad copy-paste. Result is False, of course. > > -- > 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. > For more options, visit https://groups.google.com/groups/opt_out. -- 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. For more options, visit https://groups.google.com/groups/opt_out.
