Skip to content

Commit dd9c48f

Browse files
authored
Merge pull request #229 from jhlegarreta/doc/prefer-other-params-for-kwargs
DOC: Prefer using a dedicated section for kwargs
2 parents 4cfaadb + ea6538b commit dd9c48f

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/nifreeze/utils/iterators.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ def linear_iterator(size: int | None = None, **kwargs) -> Iterator[int]:
3636
size : :obj:`int` or ``None``, optional
3737
Number of volumes in the dataset.
3838
If ``None``, ``size`` will be inferred from the ``bvals`` keyword argument.
39-
bvals : :obj:`list`, optional (keyword argument)
39+
40+
Other Parameters
41+
----------------
42+
bvals : :obj:`list`
4043
List of b-values corresponding to all orientations of a DWI dataset.
4144
If ``size`` is provided, this argument will be ignored.
4245
Otherwise, ``size`` will be inferred from the length of ``bvals``.
@@ -74,11 +77,14 @@ def random_iterator(size: int | None = None, **kwargs) -> Iterator[int]:
7477
size : :obj:`int` or ``None``, optional
7578
Number of volumes in the dataset.
7679
If ``None``, ``size`` will be inferred from the ``bvals`` keyword argument.
77-
bvals : :obj:`list`, optional (keyword argument)
80+
81+
Other Parameters
82+
----------------
83+
bvals : :obj:`list`
7884
List of b-values corresponding to all orientations of a DWI dataset.
7985
If ``size`` is provided, this argument will be ignored.
8086
Otherwise, ``size`` will be inferred from the length of ``bvals``.
81-
seed : :obj:`int`, :obj:`bool`, :obj:`str`, or ``None``, optional (keyword argument)
87+
seed : :obj:`int`, :obj:`bool`, :obj:`str`, or ``None``
8288
If :obj:`int` or :obj:`str` or ``None``, initializes the seed of Python's random generator
8389
with the given value.
8490
If ``False``, the random generator is passed ``None``.
@@ -225,7 +231,10 @@ def centralsym_iterator(size: int | None = None, **kwargs) -> Iterator[int]:
225231
size : :obj:`int` or ``None``, optional
226232
Number of volumes in the dataset.
227233
If ``None``, ``size`` will be inferred from the ``bvals`` keyword argument.
228-
bvals : :obj:`list`, optional (keyword argument)
234+
235+
Other Parameters
236+
----------------
237+
bvals : :obj:`list`
229238
List of b-values corresponding to all orientations of the dataset.
230239
If ``size`` is provided, this argument will be ignored.
231240
Otherwise, ``size`` will be inferred from the length of ``bvals``.

0 commit comments

Comments
 (0)