Skip to content

Commit 3db2d5b

Browse files
committed
Ensure sigma and mu are scalar for wrapped normal
1 parent 836b801 commit 3db2d5b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pyrecest/distributions/circle/wrapped_normal_distribution.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def __init__(
5050
"""
5151
AbstractCircularDistribution.__init__(self)
5252
HypertoroidalWrappedNormalDistribution.__init__(self, mu, sigma**2)
53+
if ndim(mu) != 0:
54+
raise ValueError(f"mu must be a scalar, but got shape {mu.shape}.")
55+
if ndim(sigma) != 0:
56+
raise ValueError(f"sigma must be a scalar, but got shape {sigma.shape}.")
5357

5458
@property
5559
def sigma(self):

0 commit comments

Comments
 (0)