I think its a pretty good idea. I'm not a sympy dev, but I stumbled on this thread because I was looking for some way to do this.
On Tuesday, December 15, 2015 at 1:05:20 PM UTC-5, Francesco Bonazzi wrote: > > I started recently some work on a symbolic expression for variance and > covariance in *sympy.stats* module: > > https://github.com/sympy/sympy/pull/10247 > > The current *stats* module defines functions such as *P (probability), E > (expectation), variance, covariance, moment, *and so on, to perform the > integral given random variables or conditions on random variables. > > I think it's convenient to also have the possibility to operate at a > higher level of abstraction, by keeping unevaluated symbolic expressions > and operating with their properties on them. > > The idea is to define a class with the same name of the function, with > capital first letter: > > - Expectation( ) vs expectation( ) > - Probability( ) vs probability( ) > - Variance( ) vs variance( ) > - ... and so on ... > > The latter ones are the existing functions, whereas the first ones are > classes that create the unevaluated expression. > > > The method *.doit()* calls the corresponding function to perform the > integral. > > > A similar relationship already exists in SymPy: > > - Integral( ) vs integrate( ) > - Derivative( ) vs diff( ) > - Sum( ) vs sum( ) > > *.doit()* calls the function. > > > I'd like to have some feedback before going on. Do you think this is a > good idea? Would you merge this once it's finished? > -- 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 https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/9a17f471-2788-48ee-a293-ac6aebafe97d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
