Skip to content

Commit b69c109

Browse files
committed
Worked on suggestions
1 parent 0e5cf38 commit b69c109

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymc3/distributions/multivariate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ def random(self, point=None, size=None):
16421642
output_shape = size + dist_shape
16431643

16441644
# Broadcasting all parameters
1645-
mu = broadcast_dist_samples_to(to_shape=output_shape, samples=[mu], size=size)[0]
1645+
(mu,) = broadcast_dist_samples_to(to_shape=output_shape, samples=[mu], size=size)
16461646
rowchol = np.broadcast_to(rowchol, shape=size + rowchol.shape[-2:])
16471647

16481648
colchol = np.broadcast_to(colchol, shape=size + colchol.shape[-2:])

pymc3/tests/test_distributions_random.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,11 +1689,11 @@ def test_matrix_normal_random_with_random_variables():
16891689
lambd = 1.0
16901690
with pm.Model() as model:
16911691
sd_dist = pm.HalfCauchy.dist(beta=2.5)
1692-
packedL = pm.LKJCholeskyCov(f"packedL", eta=2, n=D, sd_dist=sd_dist)
1692+
packedL = pm.LKJCholeskyCov("packedL", eta=2, n=D, sd_dist=sd_dist)
16931693
L = pm.expand_packed_triangular(D, packedL, lower=True)
1694-
Sigma = pm.Deterministic(f"Sigma", L.dot(L.T)) # D x D covariance
1694+
Sigma = pm.Deterministic("Sigma", L.dot(L.T)) # D x D covariance
16951695
mu = pm.MatrixNormal(
1696-
f"mu", mu=mu_0, rowcov=(1 / lambd) * Sigma, colcov=np.eye(K), shape=(D, K)
1696+
"mu", mu=mu_0, rowcov=(1 / lambd) * Sigma, colcov=np.eye(K), shape=(D, K)
16971697
)
16981698
prior = pm.sample_prior_predictive(2)
16991699

0 commit comments

Comments
 (0)