[SciPy-Dev] How to remove depreciated stats functions?

josef.pktd@gmai... josef.pktd@gmai...
Tue Apr 6 15:31:51 CDT 2010


On Tue, Apr 6, 2010 at 4:10 PM, Bruce Southey <bsouthey@gmail.com> wrote:
> On 04/06/2010 02:27 PM, josef.pktd@gmail.com wrote:
>> On Tue, Apr 6, 2010 at 3:04 PM, Bruce Southey<bsouthey@gmail.com>  wrote:
>>
>>> Hi,
>>> Is there a formal policy to fully depreciate the following stats functions?
>>> mean
>>> median
>>> std
>>> var
>>> samplestd
>>> samplevar
>>> cov
>>> corrcoef
>>> stderr
>>>
>>> Really can we either remove them, say they will be gone in 0.8 or
>>> directly equate them to numpy version (ie 'mean=np.mean')?
>>>
>> Many of them are already gone and raise an exception (mean, var, std,..)
>>
>> some others are under depreciation warning during 0.8. cycle and I
>> guess will be removed in 0.9 (samplestd, samplevar and I think
>> corrcoef and stderr).
>> I need to check, but I think all of them delegate to the numpy
>> functions, but use the old scipy default options for backwards
>> compatibility during depreciation.
>>
>> We should make sure that all function that we want to get rid of, have
>> a depreciation warning when 0.8 is released so that we can remove them
>> in 0.9 or so
>>
>> Josef
>>
>>
> Then for those stats functions  (like stats.mean, stats.var) that just
> raise a warning these should state that these will be removed with scipy
> 0.8?

I don't remember what the depreciation text was in 0.7, but in 0.8
they raise an exception
"DeprecationWarning: scipy.stats.std is deprecated; please update your
code to use numpy.std."

> I also think that the others like samplestd should go at the same
> time especially given the relatively 'slow' release of scipy.

Not possible because samplestd and similar are only depreciated in
svn, not in a release. If scipy follows the numpy policy, then we need
a full major cycle of depreciation warning and the earliest release to
remove them will be 0.9

>
> Also, there are a number of tests (eg test_std) that should also be
> removed because these are (or should be) addressed by numpy. Some of the
> warnings involve uncorrected tests (like test_stderr) that I should have
> followed up on. However, if these functions are going to get removed
> soon, it seems better to remove the test than patch it.

there is a patch attached to a ticket that will remove obsolete tests.

Actually, stderr is depreciated because it is a duplicate of
stats.sem. It is more like a t-statistic (standard error of an
estimator) not a standard deviation.

Josef

>
> Bruce
>
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>


More information about the SciPy-Dev mailing list