Repository navigation
DOC: improve math formulas in robust.norms docstrings - #9876
Merged
bashtage merged 1 commit intoJul 1, 2026
Merged
Conversation
Move piecewise formulas from the Returns section into proper reStructuredText math blocks (.. math::) before the Parameters section, matching the style already used in HuberT.rho and AndrewWave.rho. Affected classes: LeastSquares, HuberT, RamsayE, AndrewWave, TrimmedMean — methods rho, psi, weights, psi_deriv. Closes statsmodels#8807
Author
|
Hi team, I picked up issue #8807 which has been open since 2020. The ask was to move inline formulas out of the Returns description into proper Classes updated: LeastSquares, HuberT, AndrewWave, RamsayE, TrimmedMean, covering rho, psi, weights, and psi_deriv. No logic was changed, only docstrings. I confirmed all norm functions still return correct values after the edit. Happy to adjust the LaTeX formatting or add aligned equations for the piecewise cases if the rendered output needs tweaking. |
Member
|
LGTM. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves docstrings in
statsmodels/robust/norms.pyby moving mathematical formulas out of theReturnsdescription and into proper reStructuredText.. math::blocks placed before theParameterssection.This makes the rendered HTML docs consistent with the style already used in
HuberT.rho,HuberT.weights,AndrewWave.rho, andRamsayE.rho.Classes updated:
LeastSquares—rho,psi,weights,psi_derivHuberT—psiRamsayE—psi,weightsAndrewWave—psi,weightsTrimmedMean—psi,weightsCloses #8807