Home
last modified time | relevance | path

Searched refs:xrange (Results 1 – 25 of 639) sorted by relevance

12345678910>>...26

/external/python/cpython2/Lib/test/
Dtest_xrange.py72 self.assertEqual(list(xrange(3)), [0, 1, 2])
73 self.assertEqual(list(xrange(1, 5)), [1, 2, 3, 4])
74 self.assertEqual(list(xrange(0)), [])
75 self.assertEqual(list(xrange(-3)), [])
76 self.assertEqual(list(xrange(1, 10, 3)), [1, 4, 7])
77 self.assertEqual(list(xrange(5, -5, -3)), [5, 2, -1, -4])
83 self.assertEqual(list(xrange(a, a+2)), [a, a+1])
84 self.assertEqual(list(xrange(a+2, a, -1L)), [a+2, a+1])
85 self.assertEqual(list(xrange(a+4, a, -2)), [a+4, a+2])
87 seq = list(xrange(a, b, c))
[all …]
Dtest_deque.py32 d = deque(xrange(-5125, -5000))
33 d.__init__(xrange(200))
34 for i in xrange(200, 400):
36 for i in reversed(xrange(-200, 0)):
41 left = [d.popleft() for i in xrange(250)]
45 right = [d.pop() for i in xrange(250)]
67 d = deque(xrange(200), maxlen=10)
196 d = deque(xrange(n))
198 for i in xrange(n):
204 for j in xrange(1-len(l), len(l)):
[all …]
Dtest_iterlen.py67 for i in reversed(xrange(1, n+1)):
102 self.it = iter(xrange(n))
107 self.it = reversed(xrange(n))
112 self.it = iter(tuple(xrange(n)))
119 d = deque(xrange(n))
126 d = deque(xrange(n))
133 d = dict.fromkeys(xrange(n))
140 d = dict.fromkeys(xrange(n))
147 d = dict.fromkeys(xrange(n))
154 d = set(xrange(n))
[all …]
Dtest_random.py17 return [self.gen.random() for i in xrange(n)]
70 population = xrange(N)
71 for k in xrange(N+1):
86 return reduce(int.__mul__, xrange(1, n), 1)
87 for k in xrange(n):
90 for i in xrange(trials):
101 self.gen.sample(xrange(20), 2)
116 d = dict((i, complex(i, i)) for i in xrange(N))
117 for k in xrange(N+1):
145 origseq = [self.gen.random() for i in xrange(10)]
[all …]
Dtest_strtod.py116 for i in xrange(TEST_SIZE):
152 for i in xrange(100 * TEST_SIZE):
187 for j in xrange(1000):
200 for exponent in xrange(-400, -320):
202 for j in xrange(TEST_SIZE):
210 for i in xrange(10 * TEST_SIZE):
223 for i in xrange(1000):
224 for j in xrange(TEST_SIZE):
227 s += ''.join(random.choice(digits) for _ in xrange(intpart_len))
232 for _ in xrange(fracpart_len))
[all …]
Dtest_itertools.py722 argtypes = ['', 'abc', '', xrange(0), xrange(4), dict(a=1, b=2, c=3),
748 self.assertEqual(zip(xrange(3),repeat('a')),
809 self.assertEqual(list(islice(xrange(100), *args)), range(*args))
816 self.assertEqual(list(islice(xrange(100), *args)), range(*tgtargs))
819 self.assertEqual(list(islice(xrange(10), None)), range(10))
820 self.assertEqual(list(islice(xrange(10), None, None)), range(10))
821 self.assertEqual(list(islice(xrange(10), None, None, None)), range(10))
822 self.assertEqual(list(islice(xrange(10), 2, None)), range(2, 10))
823 self.assertEqual(list(islice(xrange(10), 1, None, 2)), range(1, 10, 2))
835 self.assertRaises(TypeError, islice, xrange(10))
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dconv2d_transpose_test.py22 from six.moves import xrange # pylint: disable=redefined-builtin
64 for n in xrange(x_shape[0]):
65 for k in xrange(f_shape[2]):
66 for w in xrange(y_shape[2]):
67 for h in xrange(y_shape[1]):
96 for n in xrange(x_shape[0]):
97 for k in xrange(f_shape[2]):
98 for w in xrange(y_shape[2]):
99 for h in xrange(y_shape[1]):
134 for n in xrange(x_shape[0]):
[all …]
Dconv1d_transpose_test.py22 from six.moves import xrange # pylint: disable=redefined-builtin
54 for n in xrange(y_shape[0]):
55 for w in xrange(y_shape[1]):
56 for c in xrange(y_shape[2]):
82 for n in xrange(x_shape[0]):
83 for k in xrange(f_shape[1]):
84 for w in xrange(y_shape[1]):
116 for n in xrange(x_shape[0]):
117 for k in xrange(f_shape[1]):
118 for w in xrange(pad, y_shape[1] - pad):
[all …]
Dconv3d_transpose_test.py22 from six.moves import xrange # pylint: disable=redefined-builtin
67 for n in xrange(x_shape[0]):
68 for k in xrange(f_shape[3]):
69 for w in xrange(y_shape[3]):
70 for h in xrange(y_shape[2]):
71 for d in xrange(y_shape[1]):
104 for n in xrange(x_shape[0]):
105 for k in xrange(f_shape[3]):
106 for w in xrange(y_shape[3]):
107 for h in xrange(y_shape[2]):
[all …]
Dreduce_join_op_test.py24 from six.moves import xrange # pylint: disable=redefined-builtin
44 strings = [formatter.format(i) for i in xrange(2**num_dims)]
61 for i in xrange(2**(num_dims - 1)):
64 for j in xrange(2)])
81 truth = ["{:03b}".format(i) for i in xrange(2**num_dims)]
191 truths = [_joined_array(num_dims=5, reduce_dim=i) for i in xrange(5)]
193 for i in xrange(5):
198 truths = [_joined_array(num_dims=5, reduce_dim=i) for i in xrange(5)]
200 for i in xrange(5):
206 for i in xrange(6)
[all …]
/external/python/cpython2/Tools/pybench/
DNumbers.py11 for i in xrange(self.rounds):
195 for i in xrange(self.rounds):
207 for i in xrange(self.rounds):
391 for i in xrange(self.rounds):
403 for i in xrange(self.rounds):
587 for i in xrange(self.rounds):
599 for i in xrange(self.rounds):
783 for i in xrange(self.rounds):
DLists.py14 for i in xrange(self.rounds):
130 for i in xrange(self.rounds):
144 for i in xrange(self.rounds):
163 for i in xrange(self.rounds):
175 for i in xrange(self.rounds):
294 for i in xrange(self.rounds):
307 for i in xrange(self.rounds):
320 for i in xrange(self.rounds):
334 for i in xrange(self.rounds):
349 for i in xrange(self.rounds):
DImports.py15 for i in xrange(self.rounds):
48 for i in xrange(self.rounds):
60 for i in xrange(self.rounds):
93 for i in xrange(self.rounds):
104 for i in xrange(self.rounds):
137 for i in xrange(self.rounds):
DDict.py11 for i in xrange(self.rounds):
75 for i in xrange(self.rounds):
88 for i in xrange(self.rounds):
164 for i in xrange(self.rounds):
177 for i in xrange(self.rounds):
253 for i in xrange(self.rounds):
266 for i in xrange(self.rounds):
342 for i in xrange(self.rounds):
356 for i in xrange(self.rounds):
503 for i in xrange(self.rounds):
DStrings.py16 for i in xrange(self.rounds):
82 for i in xrange(self.rounds):
98 for i in xrange(self.rounds):
164 for i in xrange(self.rounds):
180 for i in xrange(self.rounds):
246 for i in xrange(self.rounds):
258 for i in xrange(self.rounds):
321 for i in xrange(self.rounds):
335 for i in xrange(self.rounds):
381 for i in xrange(self.rounds):
[all …]
DWith.py20 for i in xrange(self.rounds):
46 for i in xrange(self.rounds):
68 for i in xrange(self.rounds):
153 for i in xrange(self.rounds):
174 for i in xrange(self.rounds):
189 for i in xrange(self.rounds):
DExceptions.py13 for i in xrange(self.rounds):
51 for i in xrange(self.rounds):
63 for i in xrange(self.rounds):
690 for i in xrange(self.rounds):
DUnicode.py21 for i in xrange(self.rounds):
87 for i in xrange(self.rounds):
103 for i in xrange(self.rounds):
169 for i in xrange(self.rounds):
181 for i in xrange(self.rounds):
244 for i in xrange(self.rounds):
258 for i in xrange(self.rounds):
304 for i in xrange(self.rounds):
322 for i in xrange(self.rounds):
379 for i in xrange(self.rounds):
[all …]
/external/tensorflow/tensorflow/compiler/tests/
Dconv3d_test.py22 from six.moves import xrange # pylint: disable=redefined-builtin
103 for n in xrange(x_shape[0]):
104 for k in xrange(f_shape[3]):
105 for w in xrange(y_shape[3]):
106 for h in xrange(y_shape[2]):
107 for d in xrange(y_shape[1]):
140 for n in xrange(x_shape[0]):
141 for k in xrange(f_shape[3]):
142 for w in xrange(y_shape[3]):
143 for h in xrange(y_shape[2]):
[all …]
/external/autotest/client/cros/audio/
Daudio_quality_measurement_unittest.py30 for index in xrange(0, rate * length_in_secs):
56 for i in xrange( len(value1) ):
72 for index in xrange(self.samples):
81 for index in xrange(self.samples):
91 for i in xrange(len(self.delay_start_time)):
94 for j in xrange(start_index,end_index):
102 for i in xrange(0, end_index):
106 for i in xrange(noise_start_index, noise_end_index):
116 for i in xrange(silence_after_playback_start_time, self.samples):
118 for i in xrange(noise_start_index, noise_end_index):
[all …]
/external/chromium-trace/catapult/devil/devil/utils/
Dparallelizer_test.py93 devices = [ParallelizerTestObject(True) for _ in xrange(0, 10)]
99 devices = [ParallelizerTestObject(True) for _ in xrange(0, 10)]
108 for i in xrange(0, 10)]
120 for _ in xrange(0, parallel_device_count)]
125 for i in xrange(0, parallel_device_count)]
132 for i in xrange(0, parallel_device_count):
143 devices = [ParallelizerTestObject(True) for _ in xrange(0, 10)]
153 devices = [ParallelizerTestObject(i) for i in xrange(0, 10)]
158 for i in xrange(0, 10):
162 devices = [ParallelizerTestObject(range(i, i + 10)) for i in xrange(0, 10)]
[all …]
/external/python/cpython2/Tools/iobench/
Diobench.py20 xrange
22 xrange = range variable
105 for i in xrange(0, size - 1):
115 for i in xrange(0, size - 1, 1000):
139 for i in xrange(0, len(source)):
146 for i in xrange(0, len(source), 20):
153 for i in xrange(0, len(source), 4096):
160 for i in xrange(0, len(source), 1000000):
169 for i in xrange(0, len(source)):
177 for i in xrange(0, len(source), 20):
[all …]
/external/python/cpython3/Tools/iobench/
Diobench.py19 xrange
21 xrange = range variable
106 for i in xrange(0, size - 1):
116 for i in xrange(0, size - 1, 1000):
140 for i in xrange(0, len(source)):
147 for i in xrange(0, len(source), 20):
154 for i in xrange(0, len(source), 4096):
161 for i in xrange(0, len(source), 1000000):
170 for i in xrange(0, len(source)):
178 for i in xrange(0, len(source), 20):
[all …]
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_RangeDataset.pbtxt7 corresponds to start in python's xrange().
13 corresponds to stop in python's xrange().
19 corresponds to step in python's xrange().
22 summary: "Creates a dataset with a range of values. Corresponds to python\'s xrange."
/external/autotest/tko/
Dstatus_lib_unittest.py41 lines = ["line #%d" for x in xrange(10)]
52 for x in xrange(2)]
53 lines = ["line #%d" % x for x in xrange(10)]
136 for i in xrange(len(self.statuses)):
138 for j in xrange(i + 1, len(self.statuses)):
148 for i in xrange(len(self.statuses)):
150 for j in xrange(i):

12345678910>>...26