BUG: stats.rankdata returned incorrect results for ties with a large number of elements


Instead of accumulating the ranks of the tied elements, a simple formula is used
for the average rank.