Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions httomo/runner/block_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@


class BlockSplitter:
"""Produces blocks from a DataSetSource according to the given max slices
per block. It provides an iterator interface, so that it can be used as::
"""
Produces blocks from a `DataSetSource` according to the given max slices per block.

Notes
-----
A slice of the data is stored in the `DataSetBlock` that is returned, no copy is made.

Examples
--------
Provides an iterator interface, so it can be used as::

splitter = BlockSplitter(source, max_slices)
for block in splitter:
process_block(block)

Where a block is a DataSet instance.

Note that a slice of the data is returned and no copy is made.
where `block` is a `DataSetBlock` instance.
"""

def __init__(self, source: DataSetSource, max_slices: int):
Expand Down
Loading