docs: correct mu description and b JSDoc type in stats/base/dists/laplace/mgf#12449
Open
Planeshifter wants to merge 1 commit into
Open
docs: correct mu description and b JSDoc type in stats/base/dists/laplace/mgf#12449Planeshifter wants to merge 1 commit into
mu description and b JSDoc type in stats/base/dists/laplace/mgf#12449Planeshifter wants to merge 1 commit into
Conversation
…s/laplace/mgf`
Normalized JSDoc parameter descriptions in `lib/main.js`, `lib/factory.js`,
`lib/native.js`, and `docs/types/index.d.ts` to match the rest of the
`stats/base/dists/laplace/` namespace:
- Changed `@param {NonNegativeNumber} b` to `@param {PositiveNumber} b`
(13/14 sibling function packages use `{PositiveNumber}`; the
implementation rejects `b <= 0.0` and the README documents that
`b <= 0` returns `NaN`, so `NonNegativeNumber` was incorrect).
- Changed `@param {number} mu - mean` to
`@param {number} mu - location parameter` (every other `@param mu`
occurrence in the namespace uses "location parameter"; the same
`docs/types/index.d.ts` already uses "location parameter" in its
top-level description, so the interface declarations were internally
inconsistent).
No behavior changes; no test or example updates required.
https://claude.ai/code/session_01Cv7Lh8wtQoKzrem6gXstiK
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 normalizes the JSDoc
@paramdescriptions and types in@stdlib/stats/base/dists/laplace/mgfso they match the rest of thestats/base/dists/laplace/namespace and the package's own runtime contract.Namespace summary
stats/base/dists/laplace/package.jsonkeys, README section list,manifest.jsonkeys, test/benchmark filenames, JSDoc@param mudescription, JSDoc@param btype, source-file structure.@returnstype (genuine semantic split —numbervsProbabilityvsPositiveNumber).@stdlib/stats/base/dists/laplace/mgfTighten
bJSDoc type from{NonNegativeNumber}to{PositiveNumber}acrosslib/main.js,lib/factory.js, andlib/native.jsto match theb <= 0.0rejection and the README contract. Renamemufrom "mean" to "location parameter" in the same files and indocs/types/index.d.ts, aligning with every sibling instats/base/dists/laplace/and the package's own top-level description.Conformance:
@param {PositiveNumber} b: 13/14 sibling function packages (~93%).@param mu - location parameter: 13/14 sibling function packages and all >30 other@param muoccurrences in the namespace (~93%).Related Issues
None.
Questions
None.
Other
Validation
package.jsonshapes, README section lists,manifest.jsonshapes, and test/benchmark/example filenames captured for all 15 members.lib/main.js,lib/index.js, andlib/validate.js.docs/types/test.ts, or external stdlib reference relies on the deviating wording; surfaced additional drift inlib/factory.jsandlib/native.js(same strings), which are included in this patch.ctorstructural deltas (intentional pure-JS class) and thestdevpython-fixtures delta (would cascade to test expectations).ctorlackinglocation-scaleandexponential familykeywords — ecosystem-wide ctor convention; verifiednormal/ctor,logistic/ctor,gumbel/ctor,cauchy/ctor,beta/ctorfollow the same convention.ctorlacking native-binding files (binding.gyp,manifest.json,src/,lib/native.js,## C APIsREADME section,test.native.js,benchmark.native.js) —ctoris a pure-JS constructor class.stdevusing python rather than julia test fixtures — out of scope per the routine (fixture-format change cascades to expected values).mgfvalidation-prologue extensionabs(t) >= 1/b— math-correct, not drift.@returnstypes — no ≥75% majority; the variation reflects genuine semantic differences.Checklist
AI Assistance
Yes
No
Code generation (e.g., when writing an implementation or fixing a bug)
Test/benchmark generation
Documentation (including examples)
Research and understanding
Disclosure
This PR was authored by Claude Code as part of an automated cross-package drift-detection sweep. The routine extracted structural and semantic features from every package in
stats/base/dists/laplace/, computed a per-feature majority pattern, and validated each candidate correction through three independent review agents before any edit. The corrections in this PR are pure JSDoc/typing changes; no behavior, signatures, or tests changed.@stdlib-js/reviewers
Generated by Claude Code