Skip to content

Commit bd94b09

Browse files
authored
Merge pull request #387 from nipreps/maint/transition-test-bsplines
MAINT: Update emprical values in test to allow transition to new scipy's BSpline
2 parents 11fadb2 + 5ddbaf7 commit bd94b09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sdcflows/tests/test_transform.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def test_conversions(tmpdir, testdata_dir, pe_dir):
340340

341341
def test_grid_bspline_weights():
342342
target_shape = (10, 10, 10)
343-
target_aff = [[1, 0, 0, -5], [0, 1, 0, -5], [0, 0, 1, -5], [0, 0, 0, 1]]
343+
target_aff = [[0.5, 0, 0, -2.5], [0, 0.5, 0, -2.5], [0, 0, 0.5, -2.5], [0, 0, 0, 1]]
344344
ctrl_shape = (4, 4, 4)
345345
ctrl_aff = [[3, 0, 0, -6], [0, 3, 0, -6], [0, 0, 3, -6], [0, 0, 0, 1]]
346346

@@ -352,7 +352,7 @@ def test_grid_bspline_weights():
352352
# Empirically determined numbers intended to indicate that something
353353
# significant has changed. If it turns out we've been doing this wrong,
354354
# these numbers will probably change.
355-
assert np.isclose(weights[0, 0], 0.18919244)
355+
assert np.isclose(weights[0, 0], 0.00089725334)
356356
assert np.isclose(weights[-1, -1], 0.18919244)
357-
assert np.isclose(weights.sum(axis=1).max(), 26.833675)
358-
assert np.isclose(weights.sum(axis=1).min(), 1.5879614)
357+
assert np.isclose(weights.sum(axis=1).max(), 129.3907)
358+
assert np.isclose(weights.sum(axis=1).min(), 0.0052327816)

0 commit comments

Comments
 (0)