Skip to content

Commit 288daaa

Browse files
committed
DOC: docstring fixes for LaTex generation
LaTeX gets very confused for list-like things inside docstring descriptions.
1 parent 252fc89 commit 288daaa

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

nibabel/arrayproxy.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,18 @@ def __init__(self, file_like, spec, mmap=True):
7878
File-like object or filename. If file-like object, should implement
7979
at least ``read`` and ``seek``.
8080
spec : object or tuple
81-
Tuple must have length 2-5, with the following values.
82-
- shape : tuple
83-
tuple of ints describing shape of data
84-
- storage_dtype : dtype specifier
85-
dtype of array inside proxied file, or input to ``numpy.dtype``
86-
to specify array dtype
87-
- offset : int
88-
Offset, in bytes, of data array from start of file
89-
(default: 0)
90-
- slope : float
91-
Scaling factor for resulting data (default: 1.0)
92-
- inter : float
93-
Intercept for rescaled data (default: 0.0)
81+
Tuple must have length 2-5, with the following values:
82+
83+
#. shape: tuple - tuple of ints describing shape of data;
84+
#. storage_dtype: dtype specifier - dtype of array inside proxied
85+
file, or input to ``numpy.dtype`` to specify array dtype;
86+
#. offset: int - offset, in bytes, of data array from start of file
87+
(default: 0);
88+
#. slope: float - scaling factor for resulting data (default: 1.0);
89+
#. inter: float - intercept for rescaled data (default: 0.0).
90+
9491
OR
92+
9593
Header object implementing ``get_data_shape``, ``get_data_dtype``,
9694
``get_data_offset``, ``get_slope_inter``
9795
mmap : {True, False, 'c', 'r'}, optional, keyword only

nibabel/ecat.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
2121
Columns in the matrix list are:
2222
23-
* 0 - Matrix identifier (frame number)
24-
* 1 - matrix data start block number (subheader followed by image data)
25-
* 2 - Last block number of matrix (image) data
26-
* 3 - Matrix status:
27-
* 1 - exists - rw
28-
* 2 - exists - ro
29-
* 3 - matrix deleted
23+
* 0: Matrix identifier (frame number)
24+
* 1: matrix data start block number (subheader followed by image data)
25+
* 2: Last block number of matrix (image) data
26+
* 3: Matrix status
27+
28+
* 1: hxists - rw
29+
* 2: exists - ro
30+
* 3: matrix deleted
3031
3132
There is one sub-header for each image frame (or matrix in the terminology
3233
above). A sub-header can also be called an *image header*. The sub-header is
@@ -339,13 +340,14 @@ def read_mlist(fileobj, endianness):
339340
mlist : (nframes, 4) ndarray
340341
matrix list is an array with ``nframes`` rows and columns:
341342
342-
* 0 - Matrix identifier (frame number)
343-
* 1 - matrix data start block number (subheader followed by image data)
344-
* 2 - Last block number of matrix (image) data
345-
* 3 - Matrix status:
346-
* 1 - exists - rw
347-
* 2 - exists - ro
348-
* 3 - matrix deleted
343+
* 0: Matrix identifier (frame number)
344+
* 1: matrix data start block number (subheader followed by image data)
345+
* 2: Last block number of matrix (image) data
346+
* 3: Matrix status
347+
348+
* 1: hxists - rw
349+
* 2: exists - ro
350+
* 3: matrix deleted
349351
350352
Notes
351353
-----
@@ -487,7 +489,7 @@ def read_subheaders(fileobj, mlist, endianness):
487489
* 0 - Matrix identifier.
488490
* 1 - subheader block number
489491
* 2 - Last block number of matrix data block.
490-
* 3 - Matrix status:
492+
* 3 - Matrix status
491493
endianness : {'<', '>'}
492494
little / big endian code
493495

0 commit comments

Comments
 (0)