[Numpy-discussion] ma's stdu and varu

Anne Archibald peridot.faceted@gmail....
Sun Apr 6 22:14:43 CDT 2008


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


More information about the Numpy-discussion mailing list