[Numpy-discussion] Does np.std() make two passes through the data?
Mon Nov 22 11:28:27 CST 2010
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)
More information about the NumPy-Discussion