@@ -135,13 +135,16 @@ def __getitem__(
135135 otherwise it may have shape ``(X, Y, Z, k)``.
136136 affine : :obj:`~numpy.ndarray` or ``None``
137137 The corresponding per-volume motion affine(s) or ``None`` if identity transform(s).
138- :obj:`tuple`
139- A variable-length tuple of additional per-volume fields. The precise
140- number, order, and types of elements in this tuple are determined by
141- the type variables :obj:`~nifreeze.data.base.Ts`. Subclasses provide
142- these values by implementing :meth:`_getextra`. If no extra fields
143- are defined, this will be an empty tuple. When a single extra field
144- is present, it appears as a one-element tuple.
138+ Unpack[:obj:`~nifreeze.data.base.Ts`]
139+ Zero or more additional per-volume fields returned as unpacked
140+ trailing elements. The exact number, order, and types of elements
141+ are determined by the type variables :obj:`~nifreeze.data.base.Ts`
142+ and by the values returned from :meth:`_getextra`. Subclasses
143+ provide these values by implementing :meth:`_getextra`. If no extra
144+ fields are defined, no element is returned.
145+ Example usages:
146+ - vols, aff, *extras = dataset[0:10]
147+ - vol, aff, bvecs, bvals = dataset[0] # when two extras are present
145148
146149 """
147150
0 commit comments