xrange() was removed in Python 3 in favor or range() (#8371)

This commit is contained in:
Christian Clauss
2022-10-27 10:36:14 +02:00
committed by GitHub
parent 5699f60a88
commit ae27e228c4

View File

@@ -20,7 +20,7 @@ a = np.zeros(n)
def prepare(a):
print('@node[%d] run prepare function' % rank)
# must take in reference and modify the reference
for i in xrange(n):
for i in range(n):
a[i] = rank + i
print('@node[%d] before-allreduce: a=%s' % (rank, str(a)))