summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.py
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2016-02-03 08:55:34 +0000
committergfyoung <gfyoung17@gmail.com>2016-03-13 22:23:44 +0100
commitb03527ded99dd7f6e2c6dd85ca3fdd043398d8bc (patch)
treee1ae6cc98c04d24fc9e48296ef6aa9e258b42c1b /numpy/lib/nanfunctions.py
parent3eff0ae052c954081e542f14be5891e1310e71f7 (diff)
downloadnumpy-b03527ded99dd7f6e2c6dd85ca3fdd043398d8bc.tar.gz
BUG: Fix binary_repr for negative numbers
Completely rewrote binary_repr method to use the Python's built-in 'bin' function to generate binary representations quickly. Fixed the behaviour for negative numbers in which insufficient widths resulted in outputs of all zero's for the two's complement. Now, it will return the two's complement with width equal to the minimum number of bits needed to represent the complement. Closes gh-7168.
Diffstat (limited to 'numpy/lib/nanfunctions.py')
0 files changed, 0 insertions, 0 deletions