[SciPy-User] Proposal for a new data analysis toolbox
josef.pktd@gmai...
josef.pktd@gmai...
Mon Nov 22 12:27:14 CST 2010
On Mon, Nov 22, 2010 at 12:28 PM, Nathaniel Smith <njs@pobox.com> wrote:
> On Mon, Nov 22, 2010 at 8:22 AM, Keith Goodman <kwgoodman@gmail.com> wrote:
>> On Mon, Nov 22, 2010 at 8:14 AM, Nathaniel Smith <njs@pobox.com> wrote:
>>> On Mon, Nov 22, 2010 at 7:52 AM, <josef.pktd@gmail.com> wrote:
>>>> I would like statistics (scipy.stats and statsmodels) to stick with
>>>> default axis=0.
>>>> I would be in favor of axis=None for nan extended versions of numpy
>>>> functions and axis=0 for stats functions as defaults, but since it
>>>> will be a standalone package with wider usage, I will be able to keep
>>>> track of axis=-1.
>>>
>>> Please let's keep everything using the same default -- it doesn't
>>> actually make life simpler if for every function I have to squint and
>>> try to remember whether or not it's a "stats function". (Like, what's
>>> "mean"?)
>>>
>>> I think the world already has a sufficient supply of arbitrarily
>>> inconsistent scientific APIs.
>>
>> nanstd, nanmean, etc use axis=None for the default.
>
> Great -- I understood Josef as arguing that they shouldn't.
I think nanmean, nanvar, nanstd, nanmax should belong in numpy and
follow numpy convention.
But when I import scipy.stats, I expect axis=0 as default, especially
for statistical tests, and similar, where I usually assume we have
observation in rows and variables in columns as in structured arrays
or record arrays.
np.cov, np.corrcoef usually throw me off, and I am surprised if it
prints a 1000x1000 array instead of 4x4. I have a hard time
remembering rowvar=1. I would prefer axis=0 or axis=1 for correlations
and covariances.
So it's mainly a question about the default when axis=None doesn't
make much sense.
Josef
>
>>What would
>> axis=None mean for a moving window sum?
>
> Well, the same as mov_sum(arr.ravel()), I suppose. Probably not very
> useful for multidimensional arrays, but I'm not sure there's a better
> default.
>
> -- Nathaniel
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list