ma's stdu and varu

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ma's stdu and varu

Anne Archibald
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?

Thanks,
Anne
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ma's stdu and varu

Travis Oliphant-5
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.

-Travis


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Loading...