Skip to content

Separate BlockSplitter docstring into sections #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
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