1 Aug 2012 15:58
Re: (no subject)
Sergio Rojas <sergio_r <at> mail.com>
2012-08-01 13:58:17 GMT
2012-08-01 13:58:17 GMT
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
--
Jeffrey
------------------------------
>>> import numpy as np
>>> import scipy.stats
>>> u1=np.random.rand(100000)
>>> u2=np.random.rand(100000)
>>> scipy.stats.kendalltau(u1,u2)
(0.00094913269132691487, 0.65256243280384563)
>>> np.version.version
'1.6.1'
>>> scipy.version.version
'0.10.1'
>>> import os
>>> os.sys.version
'2.7.2 (default, Apr 21 2012, 14:16:53) \n[GCC 4.6.1]'
Sergio
_______________________________________________ SciPy-User mailing list SciPy-User <at> scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
RSS Feed