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
Thank you all for your valuable input. Learned something 'bout Numeric
again. And my problem is solved ;-).
Thanks
Christian
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Tony S Yu wrote:
Hello,
This is something that's been bothering for awhile. When numpy raises
the following divide by zero error:
Warning: divide by zero encountered in double_scalars
is there a way to get a Traceback on where that warning occurred.
In [1]: from numpy import *
In [2]:
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
On Dec 13, 2007, at 2:21 PM, Robert Kern wrote:
Tony S Yu wrote:
Hello,
This is something that's been bothering for awhile. When numpy raises
the following divide by zero error:
Warning: divide by zero encountered in double_scalars
is there a way to get a Traceback on where that warning
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
I was needing an array representation of ndindex since ndindex only
gives an iterator but array(list(ndindex)) takes too long. There is
prob some obvious way to do this I am missing but if not feel free to
include this code which is much faster.
In [252]: time