Bumped into the following in numpy-1.0.2 and 1.0.3 (of course :-) on
both 32-bit and 64-bit linux boxes:

>>> import numpy as nm
>>> a=nm.zeros(1000000,dtype='Int32')-30000
>>> nm.median(a)
-30000.0
>>> a=nm.zeros(1000000,dtype='Int16')-30000
>>> nm.median(a)
Warning: overflow encountered in short_scalars
2768.0

Something in the computation of median overflows when there are a
large number of values near the ends of an Int16 (like my image data).
I can work around this, of course, by casting the data as something
larger, but this one could definitely use a tweak.

Mike

-- 
[EMAIL PROTECTED]
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to