Hi,
On Wed, Apr 07, 2010 at 03:28:20AM -0700, smichr wrote:
> When you use the deep option for processing expressions, what is the
> expectation? I would think that "deep" means processing arguments of
> an expressions arguments, but this is not apparently what is meant
> since, for example, the multiplied arguments of an Add's arguments are
> currently "walked" when doing a shallow expansion.
>
> >>> from sympy import *
> >>> var('x y')
> (x, y)
> >>> (x+I*y).expand(complex=1,deep=0)
> -im(y) + I*im(x) + I*re(y) + re(x)
> >>>
>
> The arguments of the Add's second argument (the Mul, I*y) were walked/
> processed so the "args of args" interpretation of deep is not what is
> being used.
> basically instances of Add and Mul are always traversed, as they are considered as non-composite objects. Everything else, Pow (to make it consistent with exp()), Function, Integral etc. is "composite" and traversed only when deep=True. Note this might be inconsistent across SymPy and 'deep' keyword argument might not available at all. > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > -- Mateusz
signature.asc
Description: This is a digitally signed message part
