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.

Aaron Meurer

On Sat, Jun 20, 2015 at 1:22 PM, Harsh Gupta <[email protected]> wrote:
> 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
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CADN8iurEUQFmrt9csBZFdkvUymwOjeC83jiejrsuKkBXMUNiVg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KGw%2B8_1i9WC3_xTUjdE%3DVK%3D%3DHykbmd7t32TZEm2T7RWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to