Sum over Index
Closed this issue · 2 comments
Oefuli commented
In your Code you start the index at 1 and 2, when taking the difference of the ranks: fr[1:n - 1] - fr[2:n].
But fr starts at 0, doesn't it? I think it should be fr[0:n-1] - fr[1:n].
GiladAmar commented
It's been a while.
But this is largely implemented as a copy of this R code:
XICOR_0.4.1.tar.gz
See the calculateXI.R file, and that does fr[1:n - 1] - fr[2:n].
You're right. It should be "fr[0:n-1] - fr[1:n]" in Python where arrays are 0-indexed, unlike in R where they are indexed at 1.
GiladAmar commented
FWIW I've addressed this issue.
Thanks for pointing it out.