Are you grouping together indexes with the same leading indexes because you
want to display their starts together since that will still be readable but
grouping together more would not be?
On Mar 29, 2014 6:01 PM, "Kyle Meyer" <notifications@github.com> wrote:

> In pymc/trace.py:
>
> > @@ -266,5 +268,12 @@ def _calculate_posterior_quantiles(sample, qlist):
> >      ## Replace ends of qlist with 'lo' and 'hi'
> >      qends = {qlist[0]: 'lo', qlist[-1]: 'hi'}
> >      qkeys = {q: qends[q] if q in qends else 'q{}'.format(q) for q in qlist}
> > -    for index in range(sample.shape[1]):
> > -        yield {qkeys[q]: var_quantiles[q][index] for q in qlist}
> > +    for _, idxs in _groupby_leading_idxs(sample.shape[1:]):
> > +        yield ''
> > +        for idx in idxs:
> > +            yield {qkeys[q]: var_quantiles[q][idx] for q in qlist}
> > +
> > +
> > +def _groupby_leading_idxs(shape):
>
> Thanks for you comments. I've pushed an updated docstring. Please let me
> know if it's still not clear or if you think there's a better way to do it.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/pymc-devs/pymc/pull/516/files#r11096140>
> .
>