Permalink
Browse files

python3 compatability for range() in slow funcs

all uses of range in the slow functions now look fine as either lists or
range objects (though the range(ndim)[axis] calls could be done more
directly...)
  • Loading branch information...
1 parent dd7a2b1 commit 8b39a94f9f61911cf6613edd41a07d9e1ed0f9ec @dougalsutherland dougalsutherland committed Apr 26, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bottleneck/slow/func.py
@@ -419,12 +419,12 @@ def scipy_rankdata(a):
sumranks = 0
dupcount = 0
newarray = np.zeros(n, float)
- for i in xrange(n):
+ for i in range(n):
sumranks += i
dupcount += 1
if i==n-1 or svec[i] != svec[i+1]:
averank = sumranks / float(dupcount) + 1
- for j in xrange(i-dupcount+1,i+1):
+ for j in range(i-dupcount+1,i+1):
newarray[ivec[j]] = averank
sumranks = 0
dupcount = 0

0 comments on commit 8b39a94

Please sign in to comment.