On Wed, Jul 29, 2015 at 1:07 PM, Neal Becker <[email protected]> wrote:
>
> np.uint64(-1)+0
> Out[36]: 1.8446744073709552e+19
>
> I often work on signal processing requiring bit-exact integral arithmetic.
> Promoting to float is not helpful - I don't understand the logic of the
> above example.

See this thread:

http://mail.scipy.org/pipermail/numpy-discussion/2015-July/073196.html

Cast your 0 to a uint64 or other unsigned int type to avoid this.

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to