Mark Dickinson added the comment:

You seem to be confusing `np.random.randint`, which is a function from NumPy 
(not part of core Python), with `random.randint` from the standard library.  
NumPy's np.random.randint does not include the endpoint.  Python's does.  As 
far as I can tell, the documentation is correct for both.

Python 2.7.8 (default, Oct 15 2014, 22:04:42) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> sum(random.randint(0, 1) for _ in range(1000))
501

Closing as 'not a bug'.

----------
nosy: +mark.dickinson
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22686>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to