MCPcopy
hub / github.com/dask/dask / concrete

Function concrete

dask/utils.py:500–512  ·  view source on GitHub ↗

Make nested iterators concrete lists >>> data = [[1, 2], [3, 4]] >>> seq = iter(map(iter, data)) >>> concrete(seq) [[1, 2], [3, 4]]

(seq)

Source from the content-addressed store, hash-verified

498
499
500def concrete(seq):
501 """Make nested iterators concrete lists
502
503 >>> data = [[1, 2], [3, 4]]
504 >>> seq = iter(map(iter, data))
505 >>> concrete(seq)
506 [[1, 2], [3, 4]]
507 """
508 if isinstance(seq, Iterator):
509 seq = list(seq)
510 if isinstance(seq, (tuple, list)):
511 seq = list(map(concrete, seq))
512 return seq
513
514
515def pseudorandom(n: int, p, random_state=None):

Callers 1

concatenate3Function · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…