From 66bb2c8a4ffe993e6b5017d28b2795d782bd0953 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Mon, 20 May 2019 15:24:28 -0500 Subject: [PATCH] Fix to sampler. Fix to issue #3481, from @lucianopaz. --- pymc3/distributions/continuous.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pymc3/distributions/continuous.py b/pymc3/distributions/continuous.py index 96a5b554905..da2258888a7 100644 --- a/pymc3/distributions/continuous.py +++ b/pymc3/distributions/continuous.py @@ -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,