summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/test_compile_function.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-08-17 22:42:39 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-08-18 10:31:35 -0700
commitb581aade6891662e37931b04bba29262cd6057de (patch)
tree488833f95378d30496b39d8b370099c226671096 /numpy/f2py/tests/test_compile_function.py
parent3d9a082d146195944071a81ed0eae9d16976961a (diff)
downloadnumpy-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