The following is a very simple function to determine if a function is even, it works but why does the Travis Cl build test fail? And can someone please tell me what the test means?
Thanks, Priyatham def is_even(f, x): """ Determines if a function is even or not. **Usage** is_even(function, variable) **Details** ``function`` can be any function defined in sympy or by the user ``variable`` is the variable with respect to which evenness has to be determined Examples ======== >>> from sympy.functions import * >>> from sympy import is_even >>> from sympy.core.symbols import symbols >>> x = symbols('x') >>> is_even(sin(x), x) False >>> is_even(cos(x), x) True >>> is_even(x**2, x) True References ========== http://en.wikipedia.org/wiki/Even_and_odd_functions """ return simplify(f - f.subs(x, -x)) == 0 -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.