Fix docstring inconsistencies in find_elbow_point, rho, psi#414
Open
kgdunn wants to merge 6 commits into
Open
Conversation
The signature is int | float and the body can return either -1 (when every value in x or y is missing) or np.nan (when the consensus intersection is degenerate because every fitted pair of lines was effectively parallel). The free-form docstring previously documented only the -1 case. Rewrite to NumPy style with Parameters and Returns sections that cover both paths, the length validation, and the >10-finite-values minimum that ValueError enforces.
The bi-weight rho function had a free-form docstring with just the paper reference. Add Parameters (documenting x and the k=2.52 tuning constant) and Returns sections, and move the paper link into a proper References section.
The Huber-style psi function had a free-form docstring with just the paper reference. Add Parameters (documenting x and the k=2.0 tuning constant) and Returns sections, and move the paper link into a proper References section.
Picks up pre-existing wrap inconsistencies in lines that fit within the 120-char limit. No behaviour change.
Patch bump covering the NumPy-style docstring corrections to find_elbow_point, rho, and psi. No behaviour change. CITATION.cff version + date-released and CHANGELOG.md updated in the same commit.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Docstring-only fixes; no behaviour change.
bivariate/_elbow_peak.py::find_elbow_point- the signature returnsint | floatand the body can return either-1(when every value inxoryis missing) ornp.nan(when the consensus intersection is degenerate), but the free-form docstring only mentioned the-1case. Rewrite to NumPy style with properParametersandReturnssections that document both return paths.monitoring/control_charts.py::rho- bi-weight rho function. Add NumPy-styleParametersandReturnssections; preserve the reference to the source paper.monitoring/control_charts.py::psi- Huber-style psi function. Add NumPy-styleParametersandReturnssections; preserve the reference to the source paper.Each fix lands as its own micro-commit; a final commit bumps the PATCH version, updates
CITATION.cff, and adds aCHANGELOG.mdentry.Test plan
ruff checkclean on both touched filesruff format --checkclean on both touched filesGenerated by Claude Code