Message219033
| Author |
skrah |
| Recipients |
Chaka_bum, asvetlov, larry, mark108, python-dev, rhettinger, serhiy.storchaka, skrah, terry.reedy |
| Date |
2014年05月24日.11:35:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1400931355.03.0.0789557281655.issue13355@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
While NumPy is of course not normative, this is what they do:
>>> numpy.random.triangular(left=1, right=2, mode=0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 3218, in mtrand.RandomState.triangular (numpy/random/mtrand/mtrand.c:13407)
ValueError: left > mode
>>> numpy.random.triangular(left=1, right=2, mode=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 3220, in mtrand.RandomState.triangular (numpy/random/mtrand/mtrand.c:13433)
ValueError: mode > right
>>> numpy.random.triangular(left=1, right=1, mode=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 3222, in mtrand.RandomState.triangular (numpy/random/mtrand/mtrand.c:13459)
ValueError: left == right |
|