[Numpy-discussion] Possible bug: uint64 + int gives float64

Nadav Horesh nadavh at visionsense.com
Sun Jun 13 09:45:48 EDT 2010


int can be larger than numpy.int64 therefore it should be coerced to float64 (or float96/float128)

  Nadav

-----Original Message-----
From: numpy-discussion-bounces at scipy.org on behalf of Pearu Peterson
Sent: Sun 13-Jun-10 12:08
To: Discussion of Numerical Python
Subject: [Numpy-discussion] Possible bug: uint64 + int gives float64
 
Hi,
I just noticed some weird behavior in operations with uint64 and int,
heres an example:

>>> numpy.uint64(3)+1
    4.0
>>> type(numpy.uint64(3)+1)
    <type 'numpy.float64'>

Pearu
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2908 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100613/01eec598/attachment.bin>


More information about the NumPy-Discussion mailing list