diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-08-17 22:42:39 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-08-18 10:31:35 -0700 |
commit | b581aade6891662e37931b04bba29262cd6057de (patch) | |
tree | 488833f95378d30496b39d8b370099c226671096 /numpy/f2py/tests/test_compile_function.py | |
parent | 3d9a082d146195944071a81ed0eae9d16976961a (diff) | |
download | numpy-b581aade6891662e37931b04bba29262cd6057de.tar.gz |
BUG: Avoid signed overflow in histogram
When dividing the range between first and last, the formula `(x - first) / (last - first)` is used, where `last >= first`
This falls apart if the types of these variables are signed integers, in which case overflow can occur.
The solution is to force the subtraction result to be unsigned.
This is a regression in 1.15.0
Diffstat (limited to 'numpy/f2py/tests/test_compile_function.py')
0 files changed, 0 insertions, 0 deletions