Re: [sympy] Re: Random Variables

2011-05-26 Thread Aaron S. Meurer
You might also look at the discussion at http://code.google.com/p/sympy/issues/detail?id=135. We used to override __eq__ to retune Eq(), but we changed it to be like it is now. You can see at around comment 22 that the main reason for the change was for performance purposes. But I would

[sympy] Re: Random Variables

2011-05-25 Thread Matthew
Is the only issue with overloading __eq__ that hashing goes away (thus not allowing use of SymPy objects inside dicts/sets, etc...)? Apparently numpy gets around this by defining a __hash__ method. Could we do the same? Are there other concerns with overloading __eq__? Consider the following

Re: [sympy] Re: Random Variables

2011-05-25 Thread Robert Kern
On Wed, May 25, 2011 at 19:32, Matthew mrock...@gmail.com wrote: Is the only issue with overloading __eq__ that hashing goes away (thus not allowing use of SymPy objects inside dicts/sets, etc...)? No. Having the ability to ask if two sympy expressions are structurally the same is important in

[sympy] Re: Random Variables

2011-05-24 Thread Vinzent Steinberg
On 24 Mai, 05:08, Matthew mrock...@gmail.com wrote: You're right - it's unclear if this should be an event or a random variable. Thanks for the heads up on 'or'. I was hoping to use | for 'given' in the future. I'll figure this out when I get there. Isn't '==' ok to use though? Isn't it

Re: [sympy] Re: Random Variables

2011-05-24 Thread Robert Kern
On Tue, May 24, 2011 at 10:44, Vinzent Steinberg vinzent.steinb...@googlemail.com wrote: On 24 Mai, 05:08, Matthew mrock...@gmail.com wrote: You're right - it's unclear if this should be an event or a random variable. Thanks for the heads up on 'or'. I was hoping to use | for 'given' in the

Re: [sympy] Re: Random Variables

2011-05-24 Thread Andy Ray Terrel
On Tue, May 24, 2011 at 11:42 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, May 24, 2011 at 10:44, Vinzent Steinberg vinzent.steinb...@googlemail.com wrote: On 24 Mai, 05:08, Matthew mrock...@gmail.com wrote: You're right - it's unclear if this should be an event or a random variable.

Re: [sympy] Re: Random Variables

2011-05-24 Thread Ronan Lamy
Le mardi 24 mai 2011 à 12:28 -0500, Andy Ray Terrel a écrit : On Tue, May 24, 2011 at 11:42 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, May 24, 2011 at 10:44, Vinzent Steinberg vinzent.steinb...@googlemail.com wrote: On 24 Mai, 05:08, Matthew mrock...@gmail.com wrote: You're

[sympy] Re: Random Variables

2011-05-23 Thread Matthew
Hi Ronan, Thanks for the feedback. Sets will be useful in many areas, not just your project, so I think you should start with that. Working on this now. Stay tuned! I think you should make your definition more rigorous, by giving symbolic names to things, to make it clearer what

[sympy] Re: Random Variables

2009-05-16 Thread Fabian Pedregosa
Yau Kwan Kiu wrote: I know sympy has random variables, and so does sage, but they cannot be manipulated (+-*/ exp, integrate...) and so their uses are limited; and I couldn't find anything like that in the googlable literature. Let's put it this way: A student may want to check his

[sympy] Re: Random Variables

2009-05-15 Thread smichr
On May 15, 5:20 am, Yau Kwan Kiu yaukwan...@gmail.com wrote: I know sympy has random variables, and so does sage, but they cannot be manipulated (+-*/ exp, integrate...) and so their uses are limited; and I couldn't find anything like that in the googlable literature. Let's put it this

[sympy] Re: Random Variables

2009-05-14 Thread Stepan Roucka
Hello, just FYI, there are already random number objects in sympy, you can access them this way: from sympy.statistics import * x = Normal(0,1) x.random() -0.181742214115 a = x.random(10) print a Sample([-1.47958009923, -1.23521203179, -0.783418473091, -0.0760736376295, -0.0466694687666,

[sympy] Re: Random Variables

2009-05-14 Thread Yau Kwan Kiu
I know sympy has random variables, and so does sage, but they cannot be manipulated (+-*/ exp, integrate...) and so their uses are limited; and I couldn't find anything like that in the googlable literature. Let's put it this way: A student may want to check his answers in his statistics exam