MCPcopy Create free account
hub / github.com/aviralkumar2907/CQL / batch

Function batch

d4rl/rlkit/pythonplusplus.py:287–307  ·  view source on GitHub ↗

Split an interable into batches of size `n`. If `n` does not evenly divide `iterable`, the last slice will be smaller. https://stackoverflow.com/questions/8290397/how-to-split-an-iterable-in-constant-size-chunks Usage: ``` for i in batch(range(0,10), 3): pr

(iterable, n=1)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected