Comment #22 on issue 3129 by [email protected]: Drastic change to
sympy.stats: Adding concept of Probability Distributions on surface level
http://code.google.com/p/sympy/issues/detail?id=3129
Issue: the definition of Binomial is:
def Binomial(n, p, succ=1, fail=0, symbol=None):
For variables like Binomial, Bernoulli, Die and Coin, we can't have the
simple call
X = Binomial(2, 0.5, 'X')
with our current notation. If we want the symbol to be mandatory, it would
be ideal that the user doesn't have to type in the symbol keyword everytime.
Some solutions:
- Move the symbol keyword up to the front, so it's
def Binomial(symbol, n, p, succ=1, fail=0):
- Move the symbol keyword after required arguments, but before the optional
ones
def Binomial(n, p, symbol, succ=1, fail=0):
- Eliminate optional arguments completely
def Binomial(n, p, symbol):
If we want to stick with this, then the first option seems best, IMO.
There's also the issue that continuous RVs can't accept string arguments as
symbols:
X = Normal(0, 1, symbol='X') returns an error. I'll change this once the
two recent pull requests are merged.
Also, what does an issue status of 'valid' mean?
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.