[docs] [issue35744] Problem in the documentation of numpy.random.randint in python 2.7

Jay report at bugs.python.org
Tue Jan 15 08:12:15 EST 2019


New submission from Jay <jay.pokarna10 at gmail.com>:

Official Documentation of python 2.7 mentions that numpy.random.randint(a,b) will return a random integer from N such that a<=N<=b. But I have run the code and I have found that it never returns equal to b. So, what I did was I ran numpy.random.randint(0,1) for 50 milion times and finally printed the sum. 

The output was 0. 

I don't know if this a documentation or an implementation issue, but this is an issue which needs to be looked at. I am attaching the code that I ran.

----------
assignee: docs at python
components: Documentation
files: sample.py
messages: 333701
nosy: Jay, docs at python
priority: normal
severity: normal
status: open
title: Problem in the documentation of numpy.random.randint in python 2.7
type: behavior
versions: Python 2.7
Added file: https://bugs.python.org/file48051/sample.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35744>
_______________________________________


More information about the docs mailing list