colour.utilities.batch#

colour.utilities.batch(sequence: Sequence, k: Union[int, Literal[3]] = 3) Generator[source]#

Return a batch generator from given sequence.

Parameters:
Yields:

Generator – Batch generator.

Return type:

Generator

Examples

>>> batch(tuple(range(10)), 3)  
<generator object batch at 0x...>