Skip to content

Commit 4fe2520

Browse files
committed
TEST: Missed ndarray.tostring() to force array->bytes conversion
1 parent 491f350 commit 4fe2520

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/freesurfer/tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def gen_old_annot_file(fpath, nverts, labels, rgba, names):
320320
# length of entry name (+1 for terminating byte)
321321
fbytes += struct.pack(dt, len(names[i]) + 1)
322322
fbytes += names[i].encode('ascii') + b'\00'
323-
fbytes += bytes(rgba[i, :].astype(dt))
323+
fbytes += bytes(rgba[i, :].astype(dt).tostring())
324324
with open(fpath, 'wb') as f:
325325
f.write(fbytes)
326326
with InTemporaryDirectory():

0 commit comments

Comments
 (0)