[Numpy-discussion] ma's stdu and varu

Travis E. Oliphant oliphant@enthought....
Sun Apr 6 23:24:17 CDT 2008

Anne Archibald wrote:
> Hi,
> I was just going through tidying up the documentation for all the many
> functions in numpy that compute standard deviations or variances (the
> functions, the methods, the methods on matrices, the methods on
> maskedarrays, all needed their docstrings updated in approximately the
> same way). I noticed that maskedarrays seem to have the functions
> "stdu" and "varu", for computing the unbiased standard deviation and
> variance (where one divides by N-1 rather than N). These are now
> available, I think, via std and var with ddof=1. More seriously, they
> still provide the peculiar older definition of var, where
> varu([1,1.j,-1,-1.j])==0. I don't use maskedarrays, and in fact I
> haven't been keeping track of what's going on with the two different
> implementations. So: what should be done about stdu and varu? Do the
> two implementations both need their definitions of std and var
> examined?

Yes, the masked arrays should be changed and stdu and varu eliminated. 


More information about the Numpy-discussion mailing list