self._comp_dists = _comp_dists
// Tests if the comp_dists can call random with non None size
with _DrawValuesContextBlocker():
if isinstance(self.comp_dists, (list, tuple)):
try:
[comp_dist.random(size=23)
for comp_dist in self.comp_dists]
After Change
// the broadcast shape would be. This shape will be the dist_shape
// used by generate samples (the shape of a single random sample)
// from the mixture
self._comp_dist_shapes = [to_tuple(d.shape) for d in comp_dists]
// All component distributions must broadcast with each other
try:
self._broadcast_shape = np.broadcast(
*[np.empty(shape) for shape in self._comp_dist_shapes]
).shape
except Exception:
raise TypeError("Supplied comp_dists shapes do not broadcast "