File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -213,15 +213,16 @@ def test_average_model():
213213 avgmodel_median = model .AverageDWIModel (dataset )
214214
215215 # Verify that average cannot be calculated in shells with one single value
216+ # The two first gradients are considered low-b orientations because of the
217+ # default threshold and are pulled out (so now index is 0 for b=500).
216218 with pytest .raises (RuntimeError ):
217- avgmodel_mean .fit_predict (2 )
219+ avgmodel_mean .fit_predict (0 )
218220
219221 assert np .allclose (avgmodel_mean .fit_predict (3 ), 1000 )
220222 assert np .allclose (avgmodel_median .fit_predict (3 ), 1000 )
221223
222- grads = list (gtab [:, - 1 ])
223- del grads [1 ]
224- assert np .allclose (avgmodel_mean_full .fit_predict (1 ), np .mean (grads ))
224+ grads = list (gtab [2 :, - 1 ])
225+ assert np .allclose (avgmodel_mean_full .fit_predict (0 ), np .mean (grads ))
225226
226227 avgmodel_mean_2000 = model .AverageDWIModel (dataset , stat = "mean" , atol_low = 1100 )
227228 avgmodel_median_2000 = model .AverageDWIModel (dataset , atol_low = 1100 )
You can’t perform that action at this time.
0 commit comments