But unfortunately it's wrong (my bad). This should also work:

    In[43]: evals.shape
    Out[43]: (10, 3, 10, 2)

    dti._roll_evals(evals, 1)

Right? Pushing this in a sec.


On Sun, Apr 14, 2013 at 11:25 AM, Stefan van der Walt <
notifications@github.com> wrote:

> In dipy/reconst/dti.py:
>
> > @@ -7,6 +7,33 @@
> >  from ..core.onetime import auto_attr
> >
> >
> > +def _roll_evals(evals, axis=-1):
> > +    """
> > +    Helper function to check that the evals provided to functions calculating
> > +    tensor statistics have the right shape
> > +
> > +    Parameters
> > +    ----------
> > +    evals : array-like
> > +        Eigenvalues of a diffusion tensor. shape should be (...,3).
>
> Perfect
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nipy/dipy/pull/170/files#r3786385>
> .
>