diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2020-04-25 12:28:57 -0400 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2020-04-26 16:43:03 -0400 |
commit | e8b84012463927a1fc9c5a236ce7c4ab4a7effaa (patch) | |
tree | d47cfce8d5719302050ee0eff35670e024c34937 /numpy/array_api/_array_object.py | |
parent | 87964f1c5738492b152e80f7e38010c69214e5ae (diff) | |
download | numpy-e8b84012463927a1fc9c5a236ce7c4ab4a7effaa.tar.gz |
BUG: random: Generator.integers(2**32) always returned 0.
When the input to Generator.integers was 2**32, the value 2**32-1
was being passed as the `rng` argument to the 32-bit Lemire method,
but that method requires `rng` be strictly less then 2**32-1.
The fix was to handle 2**32-1 by calling next_uint32 directly.
This also works for the legacy code without changing the stream
of random integers from `randint`.
Closes gh-16066.
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions