docs: fix REPL inaccuracies in stats/base/dists/rayleigh#12682
Draft
Planeshifter wants to merge 2 commits into
Draft
docs: fix REPL inaccuracies in stats/base/dists/rayleigh#12682Planeshifter wants to merge 2 commits into
stats/base/dists/rayleigh#12682Planeshifter wants to merge 2 commits into
Conversation
Corrects the REPL documentation, which stated that `mean` returns `NaN` for `σ <= 0`. The implementation rejects only `σ < 0` (`mean(0)` returns `0`), matching the package README and TypeScript declaration. The other 7 zero-arity packages in the namespace already use `σ < 0` (7/8 = 87% conformance).
Corrects "negative probability for `sigma`" to "negative value for `sigma`". `sigma` is the scale parameter, not a probability; the wording is a copy-paste residue from the preceding line documenting the `p < 0 or p > 1` condition. The other 5 factory packages in the namespace use "negative value for `sigma`" (5/6 = 83% conformance).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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.
Description
This pull request corrects two REPL documentation inaccuracies in
@stdlib/stats/base/dists/rayleighthat were surfaced by a cross-package drift scan of the namespace's 15 members. Both fixes are documentation-only and do not change runtime behavior.stats/base/dists/rayleigh/meanThe REPL documentation for
@stdlib/stats/base/dists/rayleigh/meanincorrectly stated that the function returnsNaNforσ <= 0, contradicting both the implementation, which only rejectssigma < 0, and the package README and TypeScript declarations, which correctly specifyσ < 0. A scale parameter of zero is degenerate but accepted by convention across the Rayleigh namespace — every other zero-arity package (entropy,kurtosis,median,mode,skewness,stdev,variance) documentsσ < 0, andmean(0)returns0. This commit aligns the REPL text with the actual behavior and the rest of the namespace (7/8 = 87% conformance).stats/base/dists/rayleigh/quantileThe
repl.txtdocumentation forquantileincorrectly described a negative value for the scale parametersigmaas a "negative probability" — copy-paste residue from the adjacent guard on the probability argumentp. The parametersigmais a scale parameter, not a probability, so the original phrasing was nonsensical. This aligns the wording with the five other factory packages in the namespace (cdf,logcdf,logpdf,mgf,pdf), all of which use "negative value forsigma" (5/6 = 83% conformance).Related Issues
No.
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of a cross-package drift-detection routine over the
stats/base/dists/rayleighnamespace. The two corrections that survived the drift filter were structural documentation fixes verified against each package's own implementation, README, and TypeScript declarations, as well as the conventions used by sibling packages. A human maintainer should verify the fixes before promoting this PR out of draft.@stdlib-js/reviewers
Generated by Claude Code