MAINT: stats.gstd: return result rather than raising
Reference issue
gh-20285
What does this implement/fix?
gh-20285 noted changes to stats.gstd that would make it more amenable to the addition of array API support. This implements those changes. It also deprecates support for masked arrays, since gstd seems to be unique among stats functions in that it advertises support for masked arrays such that it returns a masked array with no masked elements (many handle them, but other functions return regular arrays).
Additional information
See https://github.com/scipy/scipy/pull/20285#issuecomment-2015706838 for context and additional rationale.
@mdhaber We've had two approvals on the mailing list and the failures on the CI are unrelated. Would you like to add anything before I give it a final review?
Besides the suggestions, nope. Feel free to commit those before merge.
Looks like CI is happy. I took the liberty of assuming this would make it and adding a release note.
Merged, thanks for your work @mdhaber!