[SciPy-User] scipy.stats.kendalltau bug?
Jeffrey
zfyuan at mail.ustc.edu.cn
Sat Jul 28 12:48:17 EDT 2012
On 07/29/2012 12:23 AM, Jeffrey wrote:
> Dear all,
>
> The sentences bellow will always raise an Error or Exception just
> as follows, which is a little anomaly. Is this a bug?
>
> >>> u1=numpy.random.rand(100000)
> >>> u2=numpy.random.rand(100000)
> >>> scipy.stats.kendalltau(u1,u2)
> ---------------------------------------------------------------------------
>
> AttributeError Traceback (most recent call
> last)
> /home/zfyuan/phd/paper1/pyvine_lap/<ipython-input-28-98f367090ed1> in
> <module>()
> ----> 1 sp.stats.kendalltau(u1,u2)
>
> /usr/lib64/python2.7/site-packages/scipy/stats/stats.pyc in
> kendalltau(x, y, initial_lexsort)
> 2673
> 2674 tau = ((tot - (v + u - t)) - 2.0 * exchanges) / \
> -> 2675 np.sqrt((tot - u) * (tot - v))
> 2676
> 2677 # what follows reproduces the ending of Gary Strangman's
> original
>
>
> AttributeError: sqrt
>
Sorry, I didn't describe this bug with details. What I mean is that when
the two array have larger length, for example with length 100000, then
it is more possible that the Error would occur.
My scipy version is 0.9.0 and numpy is 1.6.2.
Thanks a lot for your answering.
--
Jeffrey
More information about the SciPy-User
mailing list