Skip to content

Commit 91fddff

Browse files
committed
RF: allow for run-to-run difference in SVD results
On 32-bit, exploring SVD seems to confirm that the results differ between runs at around 10**-10 precision. Allow for this.
1 parent 4ba7b9b commit 91fddff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nipy/algorithms/diagnostics/tests/test_screen.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ def test_screen_slice_axis():
128128
# Now the analysis works without warning
129129
res = screen(explicit_img)
130130
# And is the expected analysis
131-
assert_array_equal(pca_pos(res['pca'].get_data()),
132-
pca_pos(exp_res['pca'].get_data()))
131+
# Very oddly on scipy 0.9 32 bit - at least - results differ between
132+
# runs, so we need assert_almost_equal
133+
assert_almost_equal(pca_pos(res['pca'].get_data()),
134+
pca_pos(exp_res['pca'].get_data()))
133135
assert_array_equal(res['ts_res']['slice_mean_diff2'],
134136
exp_res['ts_res']['slice_mean_diff2'])
135137
# Turn off warnings, also get expected analysis

0 commit comments

Comments
 (0)