<br><br><div class="gmail_quote">On Sun, Nov 1, 2009 at 8:37 PM, Thomas Robitaille <span dir="ltr"><<a href="mailto:thomas.robitaille@gmail.com">thomas.robitaille@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I have a question concerning uint64 numbers - let's say I want to<br>
format a uint64 number that is > 2**31, at the moment it's necessary<br>
to wrap the numpy number inside long before formatting<br>
<br>
In [3]: "%40i" % np.uint64(2**64-1)<br>
Out[3]: '                                      -1'<br>
<br>
In [4]: "%40i" % long(np.uint64(2**64-1))<br>
Out[4]: '                    18446744073709551615'<br>
<br>
Would it be easy to modify numpy such that it automatically converts<br>
uint64 numbers to long() instead of int() when implicitly converted to<br>
python types?<br>
<br></blockquote><div><br>Hmm, I suspect this is a bug whose source is uint64 having an integer conversion function as part of the type whereas it should be undefined. A quick look at the source leaves me befuddled, so tracking down just how this happens might be a bit of work.<br>
<br>Chuck<br></div><br></div>