Skip to content

Commit 98dcd77

Browse files
committed
BF: adapt sphinx doctests to numpy 1.12
Integer indices, array returned instead of memmap.
1 parent 79ff7bf commit 98dcd77

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/source/coordinate_systems.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ middle voxel in the EPI data array like this:
9797
:nofigs:
9898

9999
>>> n_i, n_j, n_k = epi_img_data.shape
100-
>>> center_i = (n_i - 1) / 2.
101-
>>> center_j = (n_j - 1) / 2.
102-
>>> center_k = (n_k - 1) / 2.
100+
>>> center_i = (n_i - 1) // 2 # // for integer division
101+
>>> center_j = (n_j - 1) // 2
102+
>>> center_k = (n_k - 1) // 2
103103
>>> center_i, center_j, center_k
104-
(26.0, 30.0, 16.0)
104+
(26, 30, 16)
105105
>>> center_vox_value = epi_img_data[center_i, center_j, center_k]
106106
>>> center_vox_value
107107
81.549287796020508

doc/source/nifti_images.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Now we save the image and load it again:
401401
The data array has the scaling applied:
402402

403403
>>> scaled_img.get_data()
404-
memmap([[[ 10., 12., 14., 16.],
404+
...([[[ 10., 12., 14., 16.],
405405
[ 18., 20., 22., 24.],
406406
[ 26., 28., 30., 32.]],
407407
<BLANKLINE>

0 commit comments

Comments
 (0)