I might start with 2d for obviousness, but both seem fine to me.


On Sun, Mar 30, 2014 at 4:17 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):
>
>  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
> I agree. How many dimensions should the variables have before it is
> labeled? In the commit message I mention including this sort of labeling
> for variables over 2d because that is when using the blank row as a
> distinction becomes ambiguous. Do you agree with this, or would you prefer
> to start at 2d variables?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/pymc-devs/pymc/pull/516/files#r11101118>
> .
>