[SciPy-dev] RFR: Proposed fixes in scipy.stats functions for calculation of variance/error/etc.
Mon Oct 26 00:32:49 CDT 2009
On Mon, Oct 26, 2009 at 1:18 AM, Pierre GM <firstname.lastname@example.org> wrote:
> On Oct 26, 2009, at 12:59 AM, email@example.com wrote:
>> zs was the list version for the zscore using z to calculate, the
>> translation in
>> the next changeset is correct only for 1d or raveled arrays, but it
>> is missing
>> an axis argument. It looks like z was a helper function for a scalar
>> zmap got imported in this form in revision 71.
>> stats.mstats has the same functions, but they look like literal
>> since they have the same (ambiguous) treatment of axis if it's not 1d.
>> stats.mstats.z has ddof=1, the others ddof=0
> well, maybe it's time to start cleaning up mstats. For the z
> functions, that should be straightforward, provided we don't lose the
> mask with np.asarray (a np.asanyarray would be sufficient). In that
> case, we could probably drop support for them in mstats. At least, we
> should make sure that the mstats versions have the same defaults as
> the stats ones.
I was thinking about whether we can use a version of _chk_asarray
with _chk_asanyarray that preserves the subclass and then use only
methods in the function, a.mean, a.std,... for the functions that could
handle different subclasses.
asanyarray also preserves matrices, so I don't know yet how the
dimension handling works with matrices. I never use them.
And we would have to watch out with multiplication.
BTW: I would prefer "standardize" to zscore as a name.
It's more informative, than zscore (and similar for zprob)
But, I don't care too much once the docstring tells what the
function actually does.
> Scipy-dev mailing list
More information about the Scipy-dev