Issue 2684 in sympy: Deepcopy does not work on evaluate False

2011-09-12 Thread sympy
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 2684 by nico...@kwyk.fr: Deepcopy does not work on evaluate False http://code.google.com/p/sympy/issues/detail?id=2684 to reproduce: a = Float(-11.1) b = Integer(19) mul = Mul(a, b, evaluate=False) from copy import deepcopy

Re: Issue 2684 in sympy: Deepcopy does not work on evaluate False

2011-09-12 Thread sympy
Updates: Status: Accepted Comment #1 on issue 2684 by asmeurer: Deepcopy does not work on evaluate False http://code.google.com/p/sympy/issues/detail?id=2684 From what I gleamed on IRC, the problem is that it evaluates it and then sends Float the state. Perhaps we need to include

Re: Issue 2684 in sympy: Deepcopy does not work on evaluate False

2011-09-12 Thread sympy
Comment #2 on issue 2684 by ronan.l...@gmail.com: Deepcopy does not work on evaluate False http://code.google.com/p/sympy/issues/detail?id=2684 No, that wouldn't work, because when __setstate__ is called, the Mul has already been turned into a Float. I think that we have to implement

[sympy] Re: Sympy to AST, generation of generic python code

2011-09-12 Thread Mark Dewing
It seems that the term 'pattern match' is overloaded here. The existing pattern matching in sympy appears to match at the mathematical level: p = Wild('p') print (x+1).match(x+p) {p_: 1} That is, it returns the value that makes the patterned expression true. The code I've written is for

Re: [sympy] Re: Possible to set the number of columns for pretty printing ?

2011-09-12 Thread Roberto Colistete Jr.
Em 06-09-2011 13:35, Aaron Meurer escreveu: I would remove this isinstance call. Ok, done. Other than that one comment, this looks good. I didn't try applying it to test it, though (I'll wait for the actual patch to do that). Aaron Meurer My first SymPy patch is attached, it is

Re: [sympy] Re: Possible to set the number of columns for pretty printing ?

2011-09-12 Thread Aaron Meurer
Thanks. I've pushed this in. Aaron Meurer On Mon, Sep 12, 2011 at 9:23 AM, Roberto Colistete Jr. roberto.colist...@gmail.com wrote: Em 06-09-2011 13:35, Aaron Meurer escreveu: I would remove this isinstance call.    Ok, done. Other than that one comment, this looks good.  I didn't try

Re: [sympy] proportional_form function

2011-09-12 Thread Aaron Meurer
I don't remember the details of constantsimp, but how is it more general? Aaron Meurer On Mon, Sep 12, 2011 at 12:39 PM, smichr smi...@gmail.com wrote: I'm wondering if anyone else would be interested in a more general simplification function that would return an expression with all non-x

Re: [sympy] proportional_form function

2011-09-12 Thread Chris Smith
`def constantsimp(expr, independentsymbol, endnumber, startnumber=1, symbolname='C'):` It is looking to absorb constants into the the numbered symbols. proportional_form combines everything except x. I suppose one could use a renumbering scheme to assign a numbered symbol to all non-x symbols and

Re: [sympy] proportional_form function

2011-09-12 Thread Aaron Meurer
So the difference is that it numbers the symbol for you, i.e., you pass a Symbol instead of a name? I think if you think it would be useful, we should just put constantsimp in the main namespace, and perhaps choose the best API with regards to this. Aaron Meurer On Mon, Sep 12, 2011 at 2:51 PM,

Re: [sympy] proportional_form function

2011-09-12 Thread Chris Smith
OK, see what you think now. -- You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this

Re: [sympy] proportional_form function

2011-09-12 Thread Chris Smith
The API has been tuned up, too. I think I'm done with this now. -- You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to