From: Fernando P. <fpe...@gm...> - 2006-11-09 08:41:38
|
I understand why this happens, but I wonder if it should be in any way 'fixed' (if that is even feasible without introducing other problems): In [28]: x = 999999 In [29]: y = numpy.array([x]) In [30]: z = y[0] In [31]: x==z Out[31]: True In [32]: x Out[32]: 999999 In [33]: z Out[33]: 999999 In [34]: x*x Out[34]: 999998000001L In [35]: z*z Warning: overflow encountered in long_scalars Out[35]: -729379967 I am sure it will be, to say the least, pretty surprising (and I can imagine subtle bugs being caused by this). Regards, f |