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

Pearu Peterson pearu.peterson at gmail.com
Sun Jun 13 11:20:15 EDT 2010


On Sun, Jun 13, 2010 at 4:45 PM, Nadav Horesh <nadavh at visionsense.com> wrote:
> int can be larger than numpy.int64 therefore it should be coerced to float64 (or float96/float128)

Ok, I see. The results type is defined by the types of operands, not
by their values. I guess
this has been discussed earlier but with small operands this feature
may be unexpected.
For example, with the same rule the result of int64 + int should be
float64 while currently
it is int64.

Pearu



More information about the NumPy-Discussion mailing list