[Numpy-discussion] Does np.std() make two passes through the data?
Mon Nov 22 12:12:14 CST 2010
On Mon, Nov 22, 2010 at 12:28 PM, Keith Goodman <email@example.com> wrote:
> On Mon, Nov 22, 2010 at 9:13 AM, <firstname.lastname@example.org> wrote:
>> Two pass would provide precision that we would expect in numpy, but I
>> don't know if anyone ever tested the NIST problems for basic
> Here are the results for their most difficult dataset. But I guess
> running one test doesn't mean anything.
>>> np.absolute(a.std(ddof=1) - 0.1)
>>> np.absolute(nanstd_online(a, ddof=1) - 0.1)
>>> np.absolute(nanstd_simple(a, ddof=1) - 0.1)
> nan # Ha!
>>> np.absolute(nanstd_twopass(a, ddof=1) - 0.1)
Thanks, e-10 is better than I expected for a tough test, but confirms
that I don't trust any statistics by more than 6 to 10 decimals or
> NumPy-Discussion mailing list
More information about the NumPy-Discussion