Bugs item #1638627, was opened at 2007-01-18 15:18 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1638627&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Python 2.3 >Status: Closed >Resolution: Duplicate Priority: 5 Private: No Submitted By: Troels Walsted Hansen (troels) Assigned to: Raymond Hettinger (rhettinger) Summary: Incorrect documentation for random.betavariate() Initial Comment: Both the documentation at http://docs.python.org/lib/module-random.html and the docstring have the same erroneous input conditions. They claim input must be >-1 when it must in fact be >0. Note also the freak "}" that has snuck into the docstring (copied and pasted from the documentation perhaps?). >>> import random >>> print random.betavariate.__doc__ Beta distribution. Conditions on the parameters are alpha > -1 and beta} > -1. Returned values range between 0 and 1. >>> random.betavariate(0, 0) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/random.py", line 594, in betavariate y = self.gammavariate(alpha, 1.) File "/usr/lib/python2.3/random.py", line 457, in gammavariate raise ValueError, 'gammavariate: alpha and beta must be > 0.0' ValueError: gammavariate: alpha and beta must be > 0.0 ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2007-01-18 21:03 Message: Logged In: YES user_id=21627 Originator: NO This seems to be a duplicate of 1635892 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1638627&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com