From 3068b23c7e9780c61cfec6733931b94bc3a707ba Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Wed, 23 Apr 2025 10:26:37 +0100 Subject: [PATCH] Separate `BlockSplitter` docstring into sections --- httomo/runner/block_split.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/httomo/runner/block_split.py b/httomo/runner/block_split.py index e1e8aeec4..e792966dd 100644 --- a/httomo/runner/block_split.py +++ b/httomo/runner/block_split.py @@ -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):