MCPcopy Create free account
hub / github.com/RingBDStack/GDAP / chunks

Function chunks

seq2seq/utils.py:622–625  ·  view source on GitHub ↗

Yield successive n-sized chunks from lst.

(lst, n)

Source from the content-addressed store, hash-verified

620
621
622def chunks(lst, n):
623 """Yield successive n-sized chunks from lst."""
624 for i in range(0, len(lst), n):
625 yield lst[i: i + n]
626
627
628def check_output_dir(args, expected_items=0):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected