Closed
Description
Description of your problem
The last dimension is squeezed when generating random samples. This creates a problem when converting posterior predictive samples to DataArray objects.
In the following example, I would expect the second case to have shape (10, 1, 2, 1).
>>> pm.distributions.Uniform.dist(lower=np.zeros((1,2,3)), upper=np.ones((1,2,3))).random(size=10).shape
(10, 1, 2, 3)
>>> pm.distributions.Uniform.dist(lower=np.zeros((1,2,1)), upper=np.ones((1,2,1))).random(size=10).shape
(10, 1, 2)
Versions and main components
- PyMC3 Version: 3.8
- Theano Version: 1.0.4
- Python Version: 3.6.8
- Operating system: Ubuntu
- How did you install PyMC3: pip