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
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
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
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
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
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
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
`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
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,
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
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
11 matches
Mail list logo