[Numpy-discussion] average() or mean() errors

Daniel Smith neuromathdan at gmail.com
Tue Jan 23 20:29:47 EST 2007

When calling the average() or mean() functions on a small array (3 
numbers), I am seeing significant numerical errors (on the order of 1% 
with data to 8 significant digits). The code I am using is essentially:

A = zeros(3)

A[i] = X

B = average(A)

Is there something else I need to call to get better accuracy? Writing 
my own average function has sufficed, but I am curious if I am just 
calling the function wrong.

More information about the NumPy-Discussion mailing list