doc(gh-2187): docstrings for Gumbel, Laplace, Logistic#2202
Merged
Qazalbash merged 2 commits intoMay 28, 2026
Conversation
…Logistic distributions Adds math-flavored docstrings to three more continuous distributions on the pyro-ppl#2187 checklist, following the template from pyro-ppl#2188, pyro-ppl#2192, and pyro-ppl#2199: - Gumbel: class, __init__, sample, log_prob, mean, variance, cdf, icdf. - Laplace: class, __init__, sample, log_prob, mean, variance, cdf, icdf, entropy. - Logistic: class, __init__, sample, log_prob, mean, variance, cdf, icdf, entropy. Docstrings only, no logic changes. ruff check and ruff format --check are clean.
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.
Refs #2187.
Picks up three more continuous distributions on the docs checklist, following the same template as #2188, #2192, and #2199:
Gumbel— class,__init__,sample,log_prob,mean,variance,cdf,icdfLaplace— class,__init__,sample,log_prob,mean,variance,cdf,icdf,entropyLogistic— class,__init__,sample,log_prob,mean,variance,cdf,icdf,entropyAll three share the
loc/scalereal / positive shape, so the docstrings line up nicely. PDF / log-PDF / CDF / quantile formulas use short symbols (μ, β, b, s) and:attr:cross-refs to the parameter names, matching the style asked for in the #2199 review.Docstrings only — no logic changes.
Verified:
ruff check numpyro/distributions/continuous.pycleanruff format --check numpyro/distributions/continuous.pycleanpytest test/test_distributions.py -k "Gumbel or Laplace or Logistic"→ 511 passed, 87 skipped