Skip to content

Commit c963acf

Browse files
committed
Added moment to vonmises distribution
1 parent a16ec4a commit c963acf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pymc/distributions/continuous.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2924,6 +2924,12 @@ def dist(cls, mu=0.0, kappa=None, *args, **kwargs):
29242924
assert_negative_support(kappa, "kappa", "VonMises")
29252925
return super().dist([mu, kappa], *args, **kwargs)
29262926

2927+
def get_moment(rv, size, mu, kappa):
2928+
mu, _ = at.broadcast_arrays(mu, kappa)
2929+
if not rv_size_is_none(size):
2930+
mu = at.full(size, mu)
2931+
return mu
2932+
29272933

29282934
class SkewNormalRV(RandomVariable):
29292935
name = "skewnormal"

0 commit comments

Comments
 (0)