Skip to content

Commit c8448b8

Browse files
effigiesoesteban
authored andcommitted
FIX/TEST: Use higher precision serialization for FSLLinearTransform
1 parent 540228e commit c8448b8

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

nitransforms/io/fsl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class FSLLinearTransform(LinearParameters):
2020
def __str__(self):
2121
"""Generate a string representation."""
2222
lines = [
23-
" ".join(["%g" % col for col in row])
23+
" ".join("%.08f" % col for col in row)
2424
for row in self.structarr["parameters"]
2525
]
2626
return "\n".join(lines + [""])

nitransforms/tests/test_linear.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ def test_loadsave(tmp_path, data_path, testdata_path, fmt):
9292
assert np.allclose(
9393
xfm.matrix,
9494
nitl.load(fname, fmt=fmt, reference=ref_file).matrix,
95-
rtol=1e-2, # FSL incurs into large errors due to rounding
9695
)
9796

9897
assert np.allclose(
9998
xfm.matrix,
10099
nitl.load(fname, fmt=fmt, reference=ref_file, moving=ref_file).matrix,
101-
rtol=1e-2, # FSL incurs into large errors due to rounding
102100
)
103101
else:
104102
assert xfm == nitl.load(fname, fmt=fmt, reference=ref_file)

0 commit comments

Comments
 (0)