Skip to content

Commit 431f2f2

Browse files
committed
test: reproduce 4d singleton issue
1 parent e7944ef commit 431f2f2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nitransforms/tests/test_resampling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@
5151
}
5252

5353

54+
@pytest.mark.xfail(strict=True, reason="Issue #270: fails on 4D images with singleton time dimension")
55+
def test_apply_singleton_time_dimension():
56+
"""Resampling fails when the input image has a trailing singleton dimension."""
57+
data = np.reshape(np.arange(27, dtype=np.uint8), (3, 3, 3, 1))
58+
nii = nb.Nifti1Image(data, np.eye(4))
59+
xfm = nitl.Affine(np.eye(4), reference=nii)
60+
apply(xfm, nii)
61+
62+
5463
@pytest.mark.parametrize(
5564
"image_orientation",
5665
[

0 commit comments

Comments
 (0)