ENH: Expand Argument Range of random_integers#6885
ENH: Expand Argument Range of random_integers#6885charris merged 1 commit intonumpy:masterfrom gfyoung:rand_integers_expand
Conversation
|
I believe it is currently |
|
Ah, yes, in light of the underlying code, semantically that is correct. However, it seems that |
|
@charris: Updated with the wording fixes. Travis is still happy. |
|
Yes, it turns out that 'int' is the same as old python 2 'int', which was a long. The c int is 'intc'. |
|
Fair enough, though I agree with your point that we should use |
numpy/random/mtrand/mtrand.pyx
Outdated
|
LGTM modulo a couple of nits. |
|
Made changes, and Travis is happy. From your comments above, should be good to merge. |
|
Did you intend to include the This looks independent of your other PR, so will be good to go. |
|
Yikes! No, did not intend to! Let me remove that. |
Redistributes the code between the randint and random_integers
methods so that we can generate integers up to and including
np.iinfo('l').max with random_integers, which previously
would have caused an OverflowError.
|
I think I must have accidentally did |
|
I find it safer to do |
|
BTW the bar for adding things to .gitignore is pretty low -- if there's On Mon, Dec 28, 2015 at 1:50 PM, gfyoung notifications@github.com wrote:
Nathaniel J. Smith -- http://vorpus.org |
|
Travis gives a green light, so now the PR should be good to go. |
ENH: Expand Argument Range of random_integers
|
In it goes. Thanks @gfyoung . |
Redistributes the code between the
randintandrandom_integersmethods so that we can generate integers up to and includingnp.iinfo('l').maxwithrandom_integers, which previously would have caused anOverflowError.Previous behavior:
New behavior:
(Optional, But Recommended) Depends on #6824
While the PR currently allows for the generation of up to and including
np.iinfo('l').max, if #6824 is merged in, the PR will be revised to being able to generate random integers up to and includingnp.iinfo('ll').max.