Skip to content

Commit 43ee68d

Browse files
AlexAndorrabrandonwillard
authored andcommitted
Remove unused sigmoid import
1 parent 713b391 commit 43ee68d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

pymc3/distributions/multivariate.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,18 @@ def logp(value, n, a):
629629
-------
630630
TensorVariable
631631
"""
632+
n = intX(n)
633+
a = floatX(a)
634+
if value.ndim >= 1:
635+
n = at.shape_padright(n)
636+
if a.ndim > 1:
637+
a = at.shape_padleft(a)
638+
632639
sum_a = a.sum(axis=-1, keepdims=True)
633640
const = (gammaln(n + 1) + gammaln(sum_a)) - gammaln(n + sum_a)
634641
series = gammaln(value + a) - (gammaln(value + 1) + gammaln(a))
635642
result = const + series.sum(axis=-1, keepdims=True)
643+
636644
# Bounds checking to confirm parameters and data meet all constraints
637645
# and that each observation value_i sums to n_i.
638646
return bound(
@@ -811,7 +819,7 @@ def logp(self, X):
811819

812820

813821
def WishartBartlett(name, S, nu, is_cholesky=False, return_cholesky=False, initval=None):
814-
R"""
822+
r"""
815823
Bartlett decomposition of the Wishart distribution. As the Wishart
816824
distribution requires the matrix to be symmetric positive semi-definite
817825
it is impossible for MCMC to ever propose acceptable matrices.
@@ -1392,12 +1400,7 @@ def logp(self, x):
13921400
result = _lkj_normalizing_constant(eta, n)
13931401
result += (eta - 1.0) * at.log(det(X))
13941402
return bound(
1395-
result,
1396-
X >= -1,
1397-
X <= 1,
1398-
matrix_pos_def(X),
1399-
eta > 0,
1400-
broadcast_conditions=False,
1403+
result, X >= -1, X <= 1, matrix_pos_def(X), eta > 0, broadcast_conditions=False
14011404
)
14021405

14031406
def _distr_parameters_for_repr(self):

0 commit comments

Comments
 (0)