Hello,

I have discovered a strange bug with numexpr. numexpr.evaluate gives
randomized results on arrays larger than 2047 elements. The following
program demonstrates this:

from numpy import *
from numexpr import evaluate

def func(x):

    return evaluate("sum(x, axis = 0)")


x = zeros(2048)+.01

print evaluate("sum(x, axis = 0)")
print evaluate("sum(x, axis = 0)")

For me this prints different results each time, for example:

11.67
14.84

If we set the size to 2047 I get consistent results.

20.47
20.47

Interestingly, if I do not add .01 to x, it consistently sums to 0.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to