[issue13355] random.triangular error when low = mode

Mark Dickinson report at bugs.python.org
Sun Nov 6 12:09:21 CET 2011


Mark Dickinson <dickinsm at gmail.com> added the comment:

I can't reproduce this:

Python 2.7.2 |EPD 7.1-2 (32-bit)| (default, Jul  3 2011, 15:40:35) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "packages", "demo" or "enthought" for more information.
>>> from random import triangular
>>> triangular(low=1, high=2, mode=1)  # low == mode
1.185344240827765

Note that the order of the parameters to random.triangular is (low, high, mode).  I suspect that you're actually passing identical values for `low` and `high`, and that's what's causing the error.

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13355>
_______________________________________


More information about the Python-bugs-list mailing list