Follow-up agreed in the #1000 review (#1000 (comment)), deferred until that PR was in: with normalize_axis_tuple adopted there, moving the flatten-for-None and permute-last-and-merge steps from core._mad_fallback into _nanfuncs._setup is a small change that gives _median_fallback and the combiner fallbacks tuple-axis (and axis=None) support for free, and shrinks _mad_fallback to a few lines. It would also let Combiner.sigma_clipping's array-API path lift its single-integer-axis restriction (#1001 documents that restriction).
— Written by Claude at @mwcraig's direction.
Follow-up agreed in the #1000 review (#1000 (comment)), deferred until that PR was in: with
normalize_axis_tupleadopted there, moving the flatten-for-Noneand permute-last-and-merge steps fromcore._mad_fallbackinto_nanfuncs._setupis a small change that gives_median_fallbackand the combiner fallbacks tuple-axis (andaxis=None) support for free, and shrinks_mad_fallbackto a few lines. It would also letCombiner.sigma_clipping's array-API path lift its single-integer-axis restriction (#1001 documents that restriction).— Written by Claude at @mwcraig's direction.