On Sep 2, 2:51 pm, Thomas Philips <tkp...@gmail.com> wrote: > While the random module allows one to generate randome numbers with a > variety of distributions, some useful distributions are omitted - the > Student's t being among them. This distribution is easily derived from > the normal distribution and the chi-squared distribution (which in > turn is a special case of the gamma distribution). I edited and tested > a routine to generate random variables with a Student's t distribution > that I found onhttp://www.johndcook.com/python_student_t_rng.html, > which has one bug - there is an extra factor of two in y. The > corrected and tested code follows - how does one go about getting this > incorporated into random so that the entire community can beneffit > from it?
To get this into core Python, you'd usually submit a feature request at http://bugs.python.org. To maximize the chances of the feature being accepted, provide unit tests and documentation along with the code. There's a lot of good information about how the Python development process works at http://www.python.org/dev; see especially http://www.python.org/dev/contributing/. Alternatively, you might also consider submitting something to the Python package index, http://pypi.python.org/pypi, or posting this as a recipe at http://code.activestate.com/recipes/langs/python/ -- Mark -- http://mail.python.org/mailman/listinfo/python-list