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

Nadav Horesh nadavh@visionsense....
Sun Jun 13 08:45:48 CDT 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@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@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2908 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100613/01eec598/attachment-0001.bin 


More information about the NumPy-Discussion mailing list