<div dir="ltr">On Wed, Jul 29, 2015 at 1:07 PM, Neal Becker <<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>> wrote:<br>><br>> np.uint64(-1)+0<br>> Out[36]: 1.8446744073709552e+19<br>><br>> I often work on signal processing requiring bit-exact integral arithmetic.<br>> Promoting to float is not helpful - I don't understand the logic of the<br>> above example.<br><br>See this thread:<div><br></div><div><a href="http://mail.scipy.org/pipermail/numpy-discussion/2015-July/073196.html">http://mail.scipy.org/pipermail/numpy-discussion/2015-July/073196.html</a><br><br>Cast your 0 to a uint64 or other unsigned int type to avoid this.<br><br>--<br>Robert Kern</div></div>