On Monday 09 June 2008 22:30:09 Keith Goodman wrote: > On Mon, Jun 9, 2008 at 7:02 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > > There's a scipy.stats.mstats.rankdata() that take care of both ties and > > missing data. Missing data are allocated a rank of either 0 or the > > average rank, depending on some parameter. > > That sounds interesting. But I can't find it: > >> import scipy > >> from scipy import stats
Yes, you should do >>> import scipy.stats.mstats as mstats >>> mstats.rankdata > In my implementation I leave the missing values as missing. I think > that would be a nice option for rankdata. Handling missing data is why I needed a tailored rankdata. In mstats.rankdata, if you set the use_missing optional parameter to False (the default), they will have a rank of 0. As no other value will have a rank of zero, you can then remask with masked_values or masked_equal. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion