Skip to content

Commit 9853e6d

Browse files
committed
DOC: Fix code block under list item indentation
1 parent 788d6c7 commit 9853e6d

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

doc/source/devel/biaps/biap_0008.rst

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -101,33 +101,33 @@ to change silently between nibabel versions.
101101

102102
* step 1: now - add ``get_fdata`` method:
103103

104-
.. code:: python
105-
106-
def get_fdata(self, dtype=np.float64):
107-
""" Return floating point image data with necessary scalng applied.
108-
109-
If the image data is an array proxy (data not yet read from disk) then
110-
read the data from file, and retain the result in an internal cache.
111-
Future calls to ``get_fdata`` on the same image instance will return
112-
the cached copy.
113-
114-
Parameters
115-
----------
116-
dtype : numpy dtype specifier
117-
A numpy dtype specifier specifying a floating point type. Data is
118-
returned as this floating point type. Default is ``np.float64``.
119-
120-
Returns
121-
-------
122-
fdata : array
123-
Array of image data of data type `dtype`.
124-
"""
125-
dtype = np.dtype(dtype)
126-
if not issubclass(dtype, np.inexact):
127-
raise ValueError('{} should be floating point type'.format(dtype))
128-
if self._fdata_cache is None:
129-
self._fdata_cache = np.asanyarray(self._dataobj).astype(dtype)
130-
return self._fdata_cache
104+
.. code:: python
105+
106+
def get_fdata(self, dtype=np.float64):
107+
""" Return floating point image data with necessary scalng applied.
108+
109+
If the image data is an array proxy (data not yet read from disk) then
110+
read the data from file, and retain the result in an internal cache.
111+
Future calls to ``get_fdata`` on the same image instance will return
112+
the cached copy.
113+
114+
Parameters
115+
----------
116+
dtype : numpy dtype specifier
117+
A numpy dtype specifier specifying a floating point type. Data is
118+
returned as this floating point type. Default is ``np.float64``.
119+
120+
Returns
121+
-------
122+
fdata : array
123+
Array of image data of data type `dtype`.
124+
"""
125+
dtype = np.dtype(dtype)
126+
if not issubclass(dtype, np.inexact):
127+
raise ValueError('{} should be floating point type'.format(dtype))
128+
if self._fdata_cache is None:
129+
self._fdata_cache = np.asanyarray(self._dataobj).astype(dtype)
130+
return self._fdata_cache
131131
132132
Change all instances of ``get_data`` in documentation to ``get_fdata``.
133133

0 commit comments

Comments
 (0)