see below.

On Wed, Apr 18, 2012 at 15:47, [email protected] <
[email protected]> wrote:

> It would be a strain to say that sympy has a nicely abstracted rule
> set. In most of the code all such rules are just a part of the logic
> of the methods of the class in question.
>
> For example (a+a) ---> 2*a is just part of the Add __new__ method.
> When you call Add(a,a) it would apply appropriate rules and give you
> Mul(2,a).
>
> There is occasionally discussion about abstracting better such rules,
> but this is not yet done.
>
> So if you want an object that simplifies automatically in a certain
> way, just implement the rules in the __new__ method or a helper
> function and you will be good to go. It is not the cleanest solution,
> but is how most of the stuff is done at the moment.
>
> I hope that this answers you question.
>
> BTW, there is a statistics module that implements many useful idioms
> from probability theory and there is a set class that will definitely
> can be extended if you are interested in helping.
>

Thanks, looking into sympy.stats now, having made a local clone of the code.

Some comments:

There does not seem to be an implementation for countable random variables,
such
that for instance the Poisson distribution is missing, which is a pity.

There does not seem to be a mechanism for defining _conditional
distributions_

Any ideas for how to implementing some such thing?

Kjetil


>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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?hl=en.
>
>


-- 
"If you want a picture of the future - imagine a boot stamping on the human
face - forever."

George Orwell (1984)

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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?hl=en.

Reply via email to