Skip to content

Commit 9418001

Browse files
authored
Merge pull request #1 from Ahanmr/Ahanmr-pymc3-contrib
Closes #3051 - logp numpy array input- fixed
2 parents e2979a3 + 6ae7f20 commit 9418001

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymc3/distributions/multivariate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def logp(self, value):
327327
TensorVariable
328328
"""
329329
quaddist, logdet, ok = self._quaddist(value)
330-
k = value.shape[-1].astype(theano.config.floatX)
330+
k = theano.shared(value).shape[-1].astype(theano.config.floatX)
331331
norm = - 0.5 * k * pm.floatX(np.log(2 * np.pi))
332332
return bound(norm - 0.5 * quaddist - logdet, ok)
333333

@@ -441,7 +441,7 @@ def logp(self, value):
441441
TensorVariable
442442
"""
443443
quaddist, logdet, ok = self._quaddist(value)
444-
k = value.shape[-1].astype(theano.config.floatX)
444+
k = theano.shared(value).shape[-1].astype(theano.config.floatX)
445445

446446
norm = (gammaln((self.nu + k) / 2.)
447447
- gammaln(self.nu / 2.)

0 commit comments

Comments
 (0)