diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 306b1cbfb3..3407e2101e 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -31,7 +31,7 @@ - Fixed a defect in `OrderedLogistic.__init__` that unnecessarily increased the dimensionality of the underlying `p`. Related to issue issue [#3535](https://github.com/pymc-devs/pymc3/issues/3535) but was not the true cause of it. - Wrapped `DensityDist.rand` with `generate_samples` to make it aware of the distribution's shape. Added control flow attributes to still be able to behave as in earlier versions, and to control how to interpret the `size` parameter in the `random` callable signature. Fixes [3553](https://github.com/pymc-devs/pymc3/issues/3553) - Added `theano.gof.graph.Constant` to type checks done in `_draw_value` (fixes issue [3595](https://github.com/pymc-devs/pymc3/issues/3595)) - +- `HalfNormal` did not used to work properly in `draw_values`, `sample_prior_predictive`, or `sample_posterior_predictive` (fixes issue [3686](https://github.com/pymc-devs/pymc3/pull/3686)) ## PyMC3 3.7 (May 29 2019) diff --git a/pymc3/distributions/continuous.py b/pymc3/distributions/continuous.py index 6fcdfdc4f9..62b77c829c 100644 --- a/pymc3/distributions/continuous.py +++ b/pymc3/distributions/continuous.py @@ -855,7 +855,7 @@ def random(self, point=None, size=None): ------- array """ - sigma = draw_values([self.sigma], point=point)[0] + sigma = draw_values([self.sigma], point=point, size=size)[0] return generate_samples(stats.halfnorm.rvs, loc=0., scale=sigma, dist_shape=self.shape, size=size)