Skip to content

Commit

Permalink
Add suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Ricardo <[email protected]>
  • Loading branch information
Sayam753 and ricardoV94 committed Jun 13, 2021
1 parent b07d47e commit 694e4bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pymc3/distributions/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ class MvStudentT(Continuous):
Parameters
----------
nu: int
Degrees of freedom.
nu: float
Degrees of freedom, should be a positive scalar.
Sigma: matrix
Covariance matrix. Use `cov` in new code.
mu: array
Expand All @@ -339,8 +339,8 @@ def dist(cls, nu, Sigma=None, mu=None, cov=None, tau=None, chol=None, lower=True
if cov is not None:
raise ValueError("Specify only one of cov and Sigma")
cov = Sigma
nu = at.as_tensor_variable(nu)
mu = at.as_tensor_variable(mu)
nu = at.as_tensor_variable(floatX(nu))
mu = at.as_tensor_variable(floatX(mu))
cov = quaddist_matrix(cov, chol, tau, lower)
return super().dist([nu, mu, cov], **kwargs)

Expand All @@ -361,7 +361,7 @@ def logp(value, nu, mu, cov):
quaddist, logdet, ok = quaddist_parse(value, mu, cov)
k = floatX(value.shape[-1])

norm = gammaln((nu + k) / 2.0) - gammaln(nu / 2.0) - 0.5 * k * floatX(np.log(nu * np.pi))
norm = gammaln((nu + k) / 2.0) - gammaln(nu / 2.0) - 0.5 * k * at.log(nu * np.pi)
inner = -(nu + k) / 2.0 * at.log1p(quaddist / nu)
return bound(norm + inner - logdet, ok)

Expand Down

0 comments on commit 694e4bc

Please sign in to comment.