[Numpy-discussion] Propose modification to binary_repr
David Huard
david.huard at gmail.com
Thu Dec 13 09:32:53 EST 2007
Hi,
The current behavior of numpy's binary_repr is the following:
>>> binary_repr(1,width=2)
'01'
>>> binary_repr(0,width=2)
'0'
This seems inconsistent and I'd suggest always padding with zeros to make
sure that the return string always has length=width.
Objections ?
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20071213/10ed19b4/attachment.html>
More information about the NumPy-Discussion
mailing list