Skip to content

Commit b5e8d71

Browse files
committed
BF - python 3 compatibility fixes
1 parent 0f09d69 commit b5e8d71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nibabel/arraywriters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, array, out_dtype=None, calc_scale=True):
5656
--------
5757
>>> arr = np.array([0, 255], np.uint8)
5858
>>> aw = ArrayWriter(arr)
59-
>>> aw = ArrayWriter(arr, np.int8)
59+
>>> aw = ArrayWriter(arr, np.int8) #doctest: +IGNORE_EXCEPTION_DETAIL
6060
Traceback (most recent call last):
6161
...
6262
WriterError: Scaling needed but cannot scale

nibabel/volumeutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def write_zeros(fileobj, count, block_size=8194):
685685
block_size : int, optional
686686
largest continuous block to write.
687687
"""
688-
nblocks = count / block_size
688+
nblocks = int(count // block_size)
689689
rem = count % block_size
690690
blk = ZEROB * block_size
691691
for bno in range(nblocks):

0 commit comments

Comments
 (0)