[Numpy-discussion] Propose modification to binary_repr

2007-12-13 Thread David Huard
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

Re: [Numpy-discussion] Propose modification to binary_repr

2007-12-13 Thread David Huard
Change done. All tests pass. Should I document the change somewhere ? Although it's a small change, I'm guessing it could be very annoying to debug for someone depending on the previous behavior. 2007/12/13, Travis E. Oliphant [EMAIL PROTECTED]: David Huard wrote: Hi, The current

Re: [Numpy-discussion] Propose modification to binary_repr

2007-12-13 Thread Stefan van der Walt
On Thu, Dec 13, 2007 at 02:33:01PM -0500, David Huard wrote: Change done. All tests pass. Now's a good time to fix that :) Cheers Stéfan ___ Numpy-discussion mailing list Numpy-discussion@scipy.org