Skip to content

Commit

Permalink
Remove deprecated zerosum_axes argument to ZeroSumNormal
Browse files Browse the repository at this point in the history
  • Loading branch information
Armavica authored and ricardoV94 committed Oct 10, 2024
1 parent bcdb7fc commit 22b8982
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pymc/distributions/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,6 @@ class ZeroSumNormal(Distribution):
n_zerosum_axes: int, defaults to 1
Number of axes along which the zero-sum constraint is enforced, starting from the rightmost position.
Defaults to 1, i.e the rightmost axis.
zerosum_axes: int, deprecated please use n_zerosum_axes as its successor
dims: sequence of strings, optional
Dimension names of the distribution. Works the same as for other PyMC distributions.
Necessary if ``shape`` is not passed.
Expand Down Expand Up @@ -2749,15 +2748,7 @@ class ZeroSumNormal(Distribution):
rv_type = ZeroSumNormalRV
rv_op = ZeroSumNormalRV.rv_op

def __new__(
cls, *args, zerosum_axes=None, n_zerosum_axes=None, support_shape=None, dims=None, **kwargs
):
if zerosum_axes is not None:
n_zerosum_axes = zerosum_axes
warnings.warn(
"The 'zerosum_axes' parameter is deprecated. Use 'n_zerosum_axes' instead.",
DeprecationWarning,
)
def __new__(cls, *args, n_zerosum_axes=None, support_shape=None, dims=None, **kwargs):
if dims is not None or kwargs.get("observed") is not None:
n_zerosum_axes = cls.check_zerosum_axes(n_zerosum_axes)

Expand Down

0 comments on commit 22b8982

Please sign in to comment.