Skip to content

Commit 566f308

Browse files
committed
Add ZeroSumTransform to docs
1 parent cba0187 commit 566f308

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/source/api/distributions/transforms.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Specific Transform Classes
3333
LogExpM1
3434
Ordered
3535
SumTo1
36+
ZeroSumTransform
3637

3738

3839
Transform Composition Classes

pymc/distributions/multivariate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,7 @@ class ZeroSumNormal(Distribution):
24222422
Necessary if ``shape`` is not passed.
24232423
shape: tuple of integers, optional
24242424
Shape of the distribution. Works the same as for other PyMC distributions.
2425-
Necessary if ``dims`` is not passed.
2425+
Necessary if ``dims`` or ``observed`` is not passed.
24262426
24272427
Warnings
24282428
--------

pymc/distributions/transforms.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,21 +276,20 @@ class ZeroSumTransform(RVTransform):
276276
Constrains any random samples to sum to zero along the user-provided ``zerosum_axes``.
277277
By default (``zerosum_axes=[-1]``), the sum-to-zero constraint is imposed
278278
on the last axis.
279+
280+
Parameters
281+
----------
282+
zerosum_axes : list of ints
283+
Must be a list of integers (positive or negative).
284+
By default (``zerosum_axes=[-1]``), the sum-to-zero constraint is imposed
285+
on the last axis.
279286
"""
280287

281288
name = "zerosum"
282289

283290
__props__ = ("zerosum_axes",)
284291

285292
def __init__(self, zerosum_axes):
286-
"""
287-
Parameters
288-
----------
289-
zerosum_axes : list of ints
290-
Must be a list of integers (positive or negative).
291-
By default (``zerosum_axes=[-1]``), the sum-to-zero constraint is imposed
292-
on the last axis.
293-
"""
294293
self.zerosum_axes = tuple(int(axis) for axis in zerosum_axes)
295294

296295
def forward(self, value, *rv_inputs):

0 commit comments

Comments
 (0)