• Home
  • Raw
  • Download

Lines Matching refs:lst

184     lst = [0] * n
186 lst[i] = gen_item(fmt, obj)
187 return lst
248 def atomp(lst): argument
250 return not isinstance(lst, list)
252 def listp(lst): argument
253 return isinstance(lst, list)
255 def prod(lst): argument
257 if len(lst) == 0:
259 x = lst[0]
260 for v in lst[1:]:
286 lst = [0] * s[0]
290 lst[i] = _ca(items[start:start+stride], s[1:])
291 return lst
300 lst = [0] * s[0]
303 lst[i] = _fa(items[i::stride], s[1:])
304 return lst
343 def _flatten(lst): argument
345 if lst == []:
346 return lst
347 if atomp(lst):
348 return [lst]
349 return _flatten(lst[0]) + _flatten(lst[1:])
351 def flatten(lst): argument
353 if atomp(lst): # scalar
354 return lst
355 return _flatten(lst)
357 def slice_shape(lst, slices): argument
360 if atomp(lst):
362 return [len(lst[slices[0]])] + slice_shape(lst[0], slices[1:])
364 def multislice(lst, slices): argument
366 if atomp(lst):
367 return lst
368 return [multislice(sublst, slices[1:]) for sublst in lst[slices[0]]]
461 def get_item(lst, indices): argument
463 lst = lst[i]
464 return lst
775 lst, sliced=False, cast=False): argument
781 expected_len = len(lst)
819 self.assertEqual(rep, lst)
836 item2 = get_item(lst, ind)
859 flattened = flatten(lst)
962 n = 1 if ndim == 0 else len(lst)
966 self.assertEqual(rep, lst)
995 lst = ex.tolist()
998 lst = nd.tolist()
1010 lst = orig_ex.tobytes() # Issue 12834
1020 lst=lst, sliced=sliced)
1309 lst=scalar)
1321 lst=items)
1342 lst=items[::step])
1367 lst = carray(items, shape)
1371 lst=lst)
1382 lst=lst)
1389 lst = farray(items, shape)
1393 lst=lst)
1573 lst = carray(items, shape)
1576 self.assertEqual(lst[i], nd[i].tolist())
1578 self.assertEqual(lst[i][j], nd[i][j].tolist())
1580 self.assertEqual(lst[i][j][k], nd[i][j][k])
1585 lst = farray(items, shape)
1588 self.assertEqual(lst[i], nd[i].tolist())
1590 self.assertEqual(lst[i][j], nd[i][j].tolist())
1592 self.assertEqual(lst[i][j][k], nd[i][j][k])
1733 lst = carray(items, shape)
1739 sliced = multislice(lst, slices)
1768 lst = carray(items, shape)
1774 sliced = multislice(lst, slices)
1802 lst = items[:]
1804 lval = lst[lslice]
1805 rval = lst[rslice]
1806 lst[lslice] = lst[rslice]
1820 self.assertEqual(nd.tolist(), lst)
1835 self.assertEqual(mv.tolist(), lst)
1841 lst=nd.tolist())
1857 lst = carray(items, shape)
1861 result = multislice_assign(lst, lst, lslices, rslices)
1915 lst=z.tolist())
2000 strides=zl.strides, lst=zl.tolist())
2005 strides=zr.strides, lst=zr.tolist())
2263 lst = list(range(12))
2265 nd = ndarray(lst, shape=[3, 4], flags=f|ND_WRITABLE)
2267 na = numpy_array(buffer=bytearray(lst),
2273 x = ndarray(transpose(lst, [4, 3]), shape=[3, 4],
2296 x = ndarray(transpose(lst, [3, 4]), shape=[4, 3],
2299 x = ndarray(lst, shape=[3, 4], flags=ND_WRITABLE)
2319 x = ndarray(lst, shape=[3, 4], flags=ND_WRITABLE)
2352 x = ndarray(transpose(lst, [3, 4]), shape=[4, 3], flags=ND_WRITABLE)
2378 lst = carray(items, shape)
2383 lst=lst)
2390 lst=lst)
2399 lst=lst)
2408 lst = [items] if ndim == 0 else items
2412 lst=lst)
2425 lst = farray(items, shape)
2430 lst=lst)
2437 lst=lst)
2447 lst = carray(items, shape)
2452 lst=lst)
2459 lst=lst)
2705 lst = to_bytelist(ex)
2709 lst=lst, cast=True)
2713 lst = ex.tolist()
2717 lst=lst, cast=True)
2728 lst=destitems, cast=True)
2739 lst=destitems, cast=True)
2788 lst = nd.tolist()
2792 lst=lst, cast=True)
2799 lst = ex.tolist()
2804 lst=lst, cast=True)
2809 lst=lst, cast=True)
4324 lst = [0,1,2,3,4,5,6,7,8,9,10,11]
4335 lst=lst)
4355 lst=lst)
4368 lst=lst)
4377 lst=lst)
4397 lst=lst)
4412 lst=lst)