Skip to content

Commit

Permalink
major fixes and small Theano random example comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed May 30, 2016
1 parent 884f514 commit 4ccac8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pymc3/distributions/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,13 @@ class Dirichlet(MultivariateContinuous):
as a parent of Multinomial and Categorical nevertheless.
"""

def __init__(self, a, transform=transforms.stick_breaking, ndim=None, size=None, dtype=None, *args, **kwargs):
def __init__(self, a, transform=transforms.stick_breaking, ndim=None,
size=None, dtype=None, *args, **kwargs):
self.a = tt.as_tensor_variable(a)
self.mean = self.a / tt.sum(self.a)
self.mode = tt.switch(tt.all(self.a > 1),
(self.a - 1) / tt.sum(self.a - 1),
np.nan)
(self.a - 1) / tt.sum(self.a - 1),
np.nan)

self.dist_params = (self.a,)

Expand Down

0 comments on commit 4ccac8a

Please sign in to comment.