summaryrefslogtreecommitdiff
path: root/numpy/doc/byteswapping.py
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2017-11-30 10:15:55 -0800
committerEric Wieser <wieser.eric@gmail.com>2017-12-11 20:23:21 -0800
commitf9aecaf5b1fc918cf6e898d1240336f7e2e8c743 (patch)
tree292c27853ed0de4d2ced2cb5c63805cc6d277827 /numpy/doc/byteswapping.py
parent8032cf4762008155fca610fb61092e6c9ecae98b (diff)
downloadnumpy-f9aecaf5b1fc918cf6e898d1240336f7e2e8c743.tar.gz
BUG: Fix corner cases when value is NaN.
The case is illustrated below: In "_safe_ceil_to_intp": ivalue = npy_ceil(value); <= ivalue is NaN when value is NaN. if (ivalue < NPY_MIN_INTP || ivalue > NPY_MAX_INTP) { return -1; <= this is never executed when ivalue is NaN. } *ret = (npy_intp)ivalue; <= this is undefined behavior when ivalue is NaN.
Diffstat (limited to 'numpy/doc/byteswapping.py')
0 files changed, 0 insertions, 0 deletions