[SciPy-dev] RFR: Proposed fixes in scipy.stats functions for calculation of variance/error/etc.
Mon Oct 26 00:40:44 CDT 2009
Hi - by the way - I also put the recent diff, which I attached as an
additional patch here:
On Sun, Oct 25, 2009 at 10:32 PM, <firstname.lastname@example.org> wrote:
> On Mon, Oct 26, 2009 at 1:18 AM, Pierre GM <email@example.com> wrote:
>> On Oct 26, 2009, at 12:59 AM, firstname.lastname@example.org 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
> Scipy-dev mailing list
Helen Wills Neuroscience Institute
University of California, Berkeley
More information about the Scipy-dev