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
For the new solveset module we are using the SymPy set object to represent a
solution. So `solveset(x**2 - 1, x)` returns `{-1, 1}` and `solveset(x**2 - a,
x)` returns `{-a, a}` where `a` is a symbol and stands for some parameter and
`{-a, a}` is a FiniteSet object (from the sets module). With such sets sometimes
we encounter operations like the intersection of {a} and {b} where both `a` and
`b` are symbols. The current behavior of SymPy is to return an EmptySet because
`a` is not equal to `b` but in context of solveset it doesn't make sense to
return EmptySet because `a` and `b` are not values but they stand for some value
and it is possible that they will acquire the same value at some later time.
Hence, our plan is to always return an evaluated Intersection object when the
set contains symbols, but this behavior is causing some code to break in the
stats module. The issue can be solved by using python sets instead of FiniteSet
in the code using this functionality and other less preferred option is to add
some flag like `evaluate_symbols` so that people/modules can continue to use the
previous functionality. I want to have an opinion of people using the set
module.
--
Harsh
Aaron Meurer
unread,
Jun 20, 2015, 4:28:02 PM6/20/15
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
What exactly fails in the stats module?
My guess is that the sets module will need to be able to have two
modes of operation, one which is very cautious about equality and
doesn't implicitly assume that a != b, and one which is very naive
about equality. The former is more mathematically rigorous, but can
result in unwieldy expressions, which could end up being useless.
Perhaps you are right that the less rigorous case can just be handled
by Python sets, which already consider equality structurally only.