Issue 3710 in sympy: shallow expansion feature/bug

2013-03-19 Thread sympy
Status: Valid Owner: Labels: Type-Defect Priority-Medium New issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 (1 + x*(x + y)).expand(deep=False) x*(x + y) + 1 I thought that not-deep meant do something on all args of Add a

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-19 Thread sympy
Comment #1 on issue 3710 by asmeu...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 The old behavior was accidental. The new behavior is simple: deep=False only expands the top-level expression. Recall the discussion at https://github.com/sym

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-20 Thread sympy
Comment #2 on issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 In the case of expand_mul it is reasonable to want a flat expression which, after expanding, would have nothing expandable. But without entering anything but an Ad

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-20 Thread sympy
Updates: Cc: matt...@gmail.com Comment #3 on issue 3710 by asmeu...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 I would refactor such things out to a separate function that does shallow application of non-deep functions. Doing that w

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-20 Thread sympy
Comment #4 on issue 3710 by asmeu...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 I remember now. It was use(). There are similar functions in the same file too. -- You received this message because this project is configured to send all

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-21 Thread sympy
Comment #5 on issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 There is epath, too. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notificat

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-21 Thread sympy
Comment #6 on issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 There is only function 'use' in the simplify.simplify.traversaltools.py file. And this is how it can be used to give the shallow processing of an expression: e

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-21 Thread sympy
Comment #7 on issue 3710 by asmeu...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 What's the motivation for this specific level of expansion? -- You received this message because this project is configured to send all issue notifications to

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-22 Thread sympy
Comment #8 on issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 This is the intended expansion in the codebase when expand_mul is used. Since deep is automatically True, this also recurses through the entire tree making changes

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-03-23 Thread sympy
Comment #9 on issue 3710 by asmeu...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 This is the intended expansion in the codebase when expand_mul is used. Since deep is automatically True, this also recurses through the entire tree making ch

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-04-03 Thread sympy
Comment #10 on issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 want to expand the top level expression as a polynomial, right yes. Both mul and poly expansion are intended for the top level (as I've defined it) bottom_up

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-04-16 Thread sympy
Updates: Status: WontFix Comment #11 on issue 3710 by smi...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 Closing as won't fix. If you do a shallow expansion wrt Mul, you may have factors in terms that will be the same if the expansion w

Re: Issue 3710 in sympy: shallow expansion feature/bug

2013-04-16 Thread sympy
Comment #12 on issue 3710 by asmeu...@gmail.com: shallow expansion feature/bug http://code.google.com/p/sympy/issues/detail?id=3710 If you do a shallow expansion wrt Mul, you may have factors in terms that will be the same if the expansion were done deeply I'm confused. What is an example