Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PyTables/PyTables
/ chunk_generator
Function
chunk_generator
examples/simple_threading.py:25–28 ·
view source on GitHub ↗
(data_size, nchunks)
Source
from the content-addressed store, hash-verified
23
24
25
def
chunk_generator(data_size, nchunks):
26
chunk_size = math.ceil(data_size / nchunks)
27
for
start in range(0, data_size, chunk_size):
28
yield
slice(start, start + chunk_size)
29
30
31
lock = threading.Lock()
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected