[SciPy-User] scipy.stats.kendalltau bug?
Sun Jul 29 02:47:02 CDT 2012
On Sun, Jul 29, 2012 at 8:27 AM, Jeffrey <email@example.com> wrote:
> Thanks eat. I found the reason is that numpy.sqrt cannot deal with too large
> number. When calculating kendalltau, assume n=len(x),then the total pair
> number is 'tot' below:
> when calculating tau, the de-numerator is as below:
> u and v stands for ties in x and y[perm], which is zero if the two array
> sample from continuous dist. Hence (tot-u)*(tot-v) may be out of range for
> the C written ufunc 'np.sqrt', and an Error is then raised.
> What about using math.sqrt here, or multiply two np.sqrt in the
> de-numerator? Since big data sets are often seen these days.
It seems like the bug is that np.sqrt is raising an AttributeError on
valid input... can you give an example of a value that np.sqrt fails
More information about the SciPy-User