From 6b2cbd4ce8fd5088bf4d6c8c6357b3e3305378d6 Mon Sep 17 00:00:00 2001 From: cclauss Date: Fri, 13 Jul 2018 02:57:46 +0200 Subject: [PATCH] xrange(10) --> range(10) for Python 3 (#11673) __xrange()__ was removed in Python 3 in favor of __range()__. For such a small number as 10 there is no difference between __xrange()__ and __range()__ in Python 2. --- benchmark/python/sparse/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/python/sparse/util.py b/benchmark/python/sparse/util.py index c20b33a86d65..29000bdf82e4 100644 --- a/benchmark/python/sparse/util.py +++ b/benchmark/python/sparse/util.py @@ -24,7 +24,7 @@ def estimate_density(DATA_PATH, feature_size): raise Exception("Data is not there!") density = [] P = 0.01 - for _ in xrange(10): + for _ in range(10): num_non_zero = 0 num_sample = 0 with open(DATA_PATH) as f: