diff options
author | gfyoung <gfyoung17@gmail.com> | 2016-02-03 08:55:34 +0000 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2016-03-13 22:23:44 +0100 |
commit | b03527ded99dd7f6e2c6dd85ca3fdd043398d8bc (patch) | |
tree | e1ae6cc98c04d24fc9e48296ef6aa9e258b42c1b /numpy/lib/tests/test_function_base.py | |
parent | 3eff0ae052c954081e542f14be5891e1310e71f7 (diff) | |
download | numpy-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/tests/test_function_base.py')
0 files changed, 0 insertions, 0 deletions