Three PRs in scipy.stats for discussion:
1. gh-23949 proposes a new array API function that consolidates much of the behavior of NumPy-only functions scipy.stats.mstats.plotting_positions, scipy.stats.percentileofscore, and scipy.stats.ecdf.Names iquantile (since it is essentially the inverse of quantile) and ogive have been suggested, but we’d appreciate a better one!
2 gh-24697 adds array API support to scipy.stats.quantile_test, but it would also change the dtype of the returned statistic and statistic_type to be more consistent with the documentation (statistic is documented as a float), allow NaN-input to produce NaN-output, and avoid backend-dependent integer dtype rules. The change is expected to have low impact and would be documented in the release notes. See gh-24697 (comment) for background.
3. Following the precedent of scipy.stats.wilcoxon, gh-24464 adds a zstatistic attribute to the result object of scipy.stats.mannwhitneyu. The PR also marks ranksums as legacy, noting that:
This function includes a subset of the features of
mannwhitneyu.
Its statistic and p-value can be reproduced usingmannwhitneyuwith
optionsuse_continuity==Falseandmethod='asymptotic'.
Prefermannwhitneyufor use in new code.
Please join the discussions at the linked PRs!
Matt Haberland