Skip to content

Commit a021905

Browse files
committed
BF: fix example for get_fdata and array images
Float64 array images return the array from get_fdata, with default input arguements, but other data types return the array cast to float64. Tests will fail before merge of fix in #638 .
1 parent 3fbfb6a commit a021905

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/source/nibabel_images.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,11 @@ Here's an image backed by a floating point array:
243243
>>> farray_data.dtype == np.dtype(np.float64)
244244
True
245245

246-
There was no cast, so the array returned is exactly the array attached to the image:
246+
There was no cast, so the array returned is exactly the array attached to the
247+
image:
247248

248-
>>> image_data is array_img.dataobj
249-
False
249+
>>> farray_data is farray_img.dataobj
250+
True
250251

251252
For the proxy image, the ``get_fdata()`` method fetches the array data from
252253
disk using the proxy, and returns the array.

0 commit comments

Comments
 (0)