You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
Hi !
I'm working on a project where I need to save expressions unevaluated. So far so good, but I'm having a problem with boolean operators. Here is an example of expression (coming from test units, thus the apparent weirdness) :
Problem is that, contrary to other sympy operators/functions, the evaluate=False seems to have no effect. This always evaluate the expression Is there any other way to prevent that ? Am I doing something wrong ?
Many thanks for what is already an awesome library :)
Vincent
Aaron Meurer
unread,
Mar 8, 2016, 4:48:46 PM3/8/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
I think the evaluation of booleans happens in the superclass
(LatticeOp), which ignores the evaluate flag. It should probably be
considered a bug. A simple workaround would be to use Symbol("true")
and Symbol("false") instead of S.true and S.false (and replace them
with their true boolean counterparts when you wish to evaluate them).