Ah, I see. It didn't occur to me that there would be a problem with this since you include your files in the same directory as the old stuff.
You could do a similar thing with "polynomials"/"polys" and create a new directory, "stats", for your work, leaving the old stuff in "statistics". Aaron Meurer On Sat, Jul 23, 2011 at 5:41 AM, Matthew Rocklin <[email protected]> wrote: > My main concern is that I want to use words that are used in the old module > like "Normal" > Not planning to import from standard namespace. Planning on using "from > sympy.statistics import *" > I could leave the old code there but not have it imported from > sympy.statistics. So old users would have to type "from > sympy.statistics.distributions import *" to get the old Normal function. > Definitely watching Tom's work with anticipatory glee. > -Mattc > > On Fri, Jul 22, 2011 at 10:57 PM, Aaron Meurer <[email protected]> wrote: >> >> Well, regardless, it sounds like the new module can't quite yet >> replicate all the features of the old one. So just deprecate the old >> module. >> >> By the way, are you planning on the new module being included in the >> standard namespace (from sympy import *)? If so, you might want to >> choose better names for some things (e.g., E will clash with exp(1)). >> You might consider it regardless, actually. >> >> It looks like the old module is not imported by default. So I would >> recommend choosing names that seem best, without concern over name >> clashes with the old module. Things like NormalRV might sound OK now, >> but it's a name that you will have to live with well after the old >> module is gone. If someone using the old module wants to use the new >> module, he will either have to handle the name clashing himself, or >> switch his old code over to the new code (we want to encourage the >> latter). You'll have to have different file names (this is why we >> have "poly" by the way, because Mateusz wrote it when "polynomial" >> already existed). But I see you've already handled this. >> >> Finally, if the integrals aren't powerful enough, you should keep up >> with Tom's work (look at his most recent pull request). Definite >> integration in SymPy is going to get a power boost really soon. >> >> Aaron Meurer >> >> On Fri, Jul 22, 2011 at 7:54 PM, Matthew Rocklin <[email protected]> >> wrote: >> > Most of the functionality exists in the new code but how you would write >> > it >> > is different >> > old: >> > X.mean >> > X.stddev >> > X.pdf(z) >> > X.cdf(z) >> > new: >> > E(X) >> > std(X) >> > Density(X) >> > P(X<z) >> > The new code solves the problems with integrals though rather than >> > having >> > the solution hard-coded in. This causes the new code to take longer and >> > fail >> > more easily. Also, it doesn't (yet) provide sampling while the current >> > code >> > does. (btw, can anyone point me to a good general sampling reference?) >> > Almost all functionality is replicated in the new version and easily >> > re-expressed. Mostly my concern is for whoever out there might be using >> > the >> > old code. When they update their SymPy suddenly their code will break. >> > On Fri, Jul 22, 2011 at 3:38 PM, Aaron Meurer <[email protected]> >> > wrote: >> >> >> >> How easy is it to replicate the old code using your new code? >> >> >> >> Aaron Meurer >> >> >> >> On Fri, Jul 22, 2011 at 7:33 AM, Matthew Rocklin <[email protected]> >> >> wrote: >> >> > I'm rewriting the statistics module and would like to take over some >> >> > of >> >> > the >> >> > names in the previous version. I'm wondering who would mind or what >> >> > our >> >> > policy is on backwards compatibility. >> >> > Previously there was a distributions.py file with two Distribution >> >> > objects, >> >> > Normal and Uniform. I'd like to take over these two words in the >> >> > namespace >> >> > to create my own Normal and Uniform random variable objects. This >> >> > would >> >> > break anyone's code who uses them currently. Does anyone use them >> >> > currently? >> >> > The way I see it there are two decent options >> >> > 1) Take over these names, delete the old distributions.py file (all >> >> > old >> >> > functionality exists in the new version, just with new syntax) >> >> > 2) Leave distributions.py intact, use names like NormalRV and >> >> > ExponentialRV >> >> > for all of my random variable creation functions in my code. >> >> > -Matt >> >> > >> >> > -- >> >> > 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. >> >> > >> >> >> >> -- >> >> 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. >> >> >> > >> > -- >> > 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. >> > >> >> -- >> 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. >> > > -- > 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. > -- 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.
