def _comp_logp(self, value):
    comp_dists = self.comp_dists
    try:
        value_ = (value if (value.ndim > 1) else tt.shape_padright(value))
        return comp_dists.logp(value_)
    except AttributeError:
        return tt.stack([comp_dist.logp(value) for comp_dist in comp_dists], axis=1)
def _comp_logp(self, value):
    comp_dists = self.comp_dists
    try:
        value_ = (value if (value.ndim > 1) else tt.shape_padright(value))
        return comp_dists.logp(value_)
    except AttributeError:
        return tt.stack([comp_dist.logp(value) for comp_dist in comp_dists], axis=1)