Skip to content

Commit f7a55c5

Browse files
committed
Improve docstrings
1 parent dec4a9f commit f7a55c5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pymc/distributions/multivariate.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2403,10 +2403,16 @@ class ZeroSumNormal(Distribution):
24032403
By default, the last axis is constrained to sum to zero.
24042404
See `zerosum_axes` kwarg for more details.
24052405
2406+
.. math:
2407+
2408+
ZSN(\sigma) = N(0, \sigma^2 (I - \tfrac{1}{n}J)
2409+
where $J_{ij} = 1$
2410+
24062411
Parameters
24072412
----------
24082413
sigma : tensor_like of float
2409-
Standard deviation (sigma > 0).
2414+
Scale parameter (sigma > 0).
2415+
It's actually the standard deviation of the underlying, unconstrained Normal distribution.
24102416
Defaults to 1 if not specified.
24112417
For now, ``sigma`` has to be a scalar, to ensure the zero-sum constraint.
24122418
zerosum_axes: list or tuple of strings or integers

pymc/distributions/transforms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ def bounds_fn(*rv_inputs):
273273

274274
class ZeroSumTransform(RVTransform):
275275
"""
276-
Constrains the samples of a Normal distribution to sum to zero
277-
along the user-provided ``zerosum_axes``.
276+
Constrains any random samples to sum to zero along the user-provided ``zerosum_axes``.
278277
By default (``zerosum_axes=[-1]``), the sum-to-zero constraint is imposed
279278
on the last axis.
280279
"""

0 commit comments

Comments
 (0)