Skip to content

Commit f6c99ef

Browse files
author
Chris Fonnesbeck
committed
Additional work on HW covariance
1 parent b1c3164 commit f6c99ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymc3/distributions/multivariate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ class HWCov(Continuous):
488488
def __init__(self, nu, a, *args, **kwargs):
489489
self.nu = nu
490490
self.a = a
491+
self.p = p = a.shape[0]
491492
self.mean = tt.nlinalg.alloc_diag(a)
492493
super(HWCov, self).__init__(*args, **kwargs)
493494

@@ -505,8 +506,8 @@ def _random(nu, a, size=None):
505506

506507
def logp(self, S):
507508
nu = self.nu
508-
p = self.shape[0]
509509
a = self.a
510+
p = self.p
510511

511512
S_inv_diag = matrix_inverse(S).diagonal()
512513

0 commit comments

Comments
 (0)