i thought about that - i was going to keep it that way for consistency with
the formatting in Biometry but instead I will just make a note of it and
make the change you suggest


On Wed, May 14, 2014 at 1:47 PM, Jai Ram Rideout
<notifications@github.com>wrote:

> In skbio/math/stats/test.py:
>
> > -                "G_fit requires all observed values to be positive.")
> > -        if e <= 0:
> > -            raise ZeroExpectedError(
> > -                "G_fit requires all expected values to be positive.")
> > -        if o:  # if o is zero, o * log(o/e) must be zero as well.
> > -            G += o * np.log(o / e)
> > -            n += o
> > -
> > -    G *= 2
> > +    # G = 2*sum(f_i*ln(f_i/f_i_hat)) over all i phenotypes/sample classes
> > +    # calculate the total number of observations under the consideration that
> > +    # multiple observations in a given group are averaged.
> > +    avgs = np.array([np.array(i).mean() for i in data])
> > +    n = avgs.sum()
> > +    a = len(data)  # a is number of phenotypes or sample classes
> > +    obs_freqs = avgs  # f_i values
>
> unnecessary now- can you just use avgs in place of this var?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biocore/scikit-bio/pull/342/files#r12656780>
> .
>