Skip to content

Commit

Permalink
Fix to sampler.
Browse files Browse the repository at this point in the history
Fix to issue pymc-devs#3481, from @lucianopaz.
  • Loading branch information
rpgoldman committed May 20, 2019
1 parent ff7f047 commit cc9a46c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pymc3/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,13 @@ def random(self, point=None, size=None):
-------
array
"""
mu_v, std_v, a_v, b_v = draw_values(
[self.mu, self.sigma, self.lower, self.upper], point=point, size=size)
mu_v, std_v, a_v, b_v = broadcast_distribution_samples(
draw_values(
[self.mu, self.sigma, self.lower, self.upper],
point=point,
size=size),
size=size,
)
return generate_samples(stats.truncnorm.rvs,
a=(a_v - mu_v)/std_v,
b=(b_v - mu_v) / std_v,
Expand Down

0 comments on commit cc9a46c

Please sign in to comment.