homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients georg.brandl, mark.dickinson, orsenthil, sciencebuggy
Date 2014年10月21日.15:42:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413906148.69.0.297265937278.issue22686@psf.upfronthosting.co.za>
In-reply-to
Content
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'.
History
Date User Action Args
2014年10月21日 15:42:28mark.dickinsonsetrecipients: + mark.dickinson, georg.brandl, orsenthil, sciencebuggy
2014年10月21日 15:42:28mark.dickinsonsetmessageid: <1413906148.69.0.297265937278.issue22686@psf.upfronthosting.co.za>
2014年10月21日 15:42:28mark.dickinsonlinkissue22686 messages
2014年10月21日 15:42:28mark.dickinsoncreate

AltStyle によって変換されたページ (->オリジナル) /