Skip to content

Commit 8870068

Browse files
committed
FIX: Python 2 division
1 parent 832f584 commit 8870068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/freesurfer/mghformat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def _affine2header(self):
549549
# for more information, go through save_mgh.m in FreeSurfer dist
550550
voxelsize = voxel_sizes(self._affine)
551551
Mdc = self._affine[:3, :3] / voxelsize
552-
c_ras = self._affine.dot(np.vstack((shape / 2, [1])))[:3]
552+
c_ras = self._affine.dot(np.vstack((shape / 2.0, [1])))[:3]
553553

554554
# Assign after we've had a chance to raise exceptions
555555
hdr['voxelsize'] = voxelsize

0 commit comments

Comments
 (0)