colour.utilities.batch#
- colour.utilities.batch(sequence: collections.abc.Sequence, k: Union[int, Literal[3]] = 3) collections.abc.Generator [source]#
Return a batch generator from given sequence.
- Parameters
sequence (collections.abc.Sequence) – Sequence to create batches from.
- Yields
Generator – Batch generator.
- Return type
Examples
>>> batch(tuple(range(10)), 3) <generator object batch at 0x...>