:goat:


On (May-14-14|17:18), Jai Ram Rideout wrote:
> > -        r = 1.0 * ((n * sum_xy) - (sum_x * sum_y)) / \
> > -            (np.sqrt((n * sum_x_sq) - (sum_x * sum_x))
> > -             * np.sqrt((n * sum_y_sq) - (sum_y * sum_y)))
> > -    except (ZeroDivisionError, ValueError, FloatingPointError):
> > -        # no variation
> > -        r = 0.0
> > -    # check we didn't get a naughty value for r due to rounding error
> > -    if r > 1.0:
> > -        r = 1.0
> > -    elif r < -1.0:
> > -        r = -1.0
> > -    return r
> > -
> > -
> > -def spearman(x_items, y_items):
> > +def pearson(v1, v2):
> 
> Good point @ElDeveloper, see my latest comment [here](https://github.com/biocore/scikit-bio/pull/342#issuecomment-43155903) (it's related).
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/biocore/scikit-bio/pull/342/files#r12669201