summaryrefslogtreecommitdiff
path: root/numpy/array_api/_array_object.py
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2020-04-25 12:28:57 -0400
committerWarren Weckesser <warren.weckesser@gmail.com>2020-04-26 16:43:03 -0400
commite8b84012463927a1fc9c5a236ce7c4ab4a7effaa (patch)
treed47cfce8d5719302050ee0eff35670e024c34937 /numpy/array_api/_array_object.py
parent87964f1c5738492b152e80f7e38010c69214e5ae (diff)
downloadnumpy-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