Dear all,

(Sorry in case this is a double post, it seems to have vanished as far as I 
can tell.)

I have a large number of boolean expressions (a few thousand) that each 
only depend on a few symbols, but in total there are thousands of symbols 
as well, and I know the truth values of each symbol. I would like to 
evaluate the expressions with the known truth values but I found that 
looping over the expressions and calling the 'subs' method on each one with 
my very large dictionary of symbols and truth values is painfully slow. I 
had a look at the source code and it seems that 'subs' iterates over pairs 
of old/replacement which explains why this takes so long. I suppose what I 
could do, and what I would like to have a method for, is to extract the 
symbols for the expression, collect their truth values from the dictionary 
(so a simple direct replacement of single symbols) and evaluate the 
expression accordingly. Does this exist, should I always extract the values 
first myself, or am I missing some handy method?

Since I have so many expressions, is there a way I'm missing to evaluate 
all of them at once?

Thank you for your insights,
Moritz

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to