gh-22194 proposed that we turn attention from scipy.stats.mstats toward adding support for missing data to scipy.stats functions. At this point, I think all the functionality we wanted to preserve can be achieved via the usual scipy.stats functions, mostly using MArrays that wrap NumPy, CuPy, or PyTorch arrays (rather than NumPy masked arrays). With SciPy 2.0 making alternative backend support public, I’d propose that we deprecate scipy.stats.mstats functions in SciPy 2.0 and remove them in SciPy 2.2.
To minimize disruption, we will:
- release a separate
mstatspackage compatible with SciPy 2.0 that reflectsscipy.stats.mstatsfrom SciPy 1.18.0 - add a transition guide with examples of using MArrays and
nan_policy=’omit’to replace the use of NumPy masked arrays andscipy.stats.mstats. - emit a deprecation warning when any
scipy.stats.mstatsfunction is executed - include deprecation admonitions for every
scipy.stats.mstatsfunction and in otherscipy.stats.mstatsdocumentation in the SciPy 2.0 and 2.1 documentation - mention the deprecation in the SciPy 2.0 release notes
Please join the discussion in gh-22194 and consider reviewing the initial implementation PR, gh-26018.
Thanks,
Matt