Oops, I hadn't realized there was a more extensive commit message, that
does clear things up. I think it looks pretty good.

I might also print out the indexes in numpy indexing format like
[0,0,:] ...
[0,1,:] ...
[0,2,:] ...
so that its more obvious what the indexes represent


On Sun, Mar 30, 2014 at 3:21 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):
>
> Yes, it puts a blank line between the rows of different dimensions. The
> rows reflect that indices for the very last dimension. I tried to explain
> this in detail in the commit message, but I should rephrase it that if it's
> not clear (please let me know). These could all be collapsed into one
> dimension for displaying in the summary table (so no blank row), but then
> you're losing any distinction that was given by the dimensions.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/pymc-devs/pymc/pull/516/files#r11100783>
> .
>