Skip to content

Commit b1f6e2c

Browse files
committed
TEST: Add comment to explain parameters
1 parent 779f27b commit b1f6e2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nibabel/tests/test_proxy_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ def obj_params(self):
221221
offsets = (self.header_class().get_data_offset(),)
222222
else:
223223
offsets = (0, 16)
224+
# For non-integral parameters, cast to float32 value can be losslessly cast
225+
# later, enabling exact checks, then back to float for consistency
224226
slopes = (1., 2., float(np.float32(3.1416))) if self.has_slope else (1.,)
225227
inters = (0., 10., float(np.float32(2.7183))) if self.has_inter else (0.,)
226228
for shape, dtype, offset, slope, inter in product(self.shapes,

0 commit comments

Comments
 (0)