@@ -15,14 +15,17 @@ def n_batches():
1515 return 13
1616
1717
18- @pytest .mark .parametrize ("stat_class, ref_func, axis" , [
19- (BatchVar , np .var , (0 , 1 )),
20- (BatchVar , np .var , (0 , 1 , 2 )),
21- (BatchStd , np .std , (0 , 1 )),
22- (BatchVar , np .var , (1 , 0 )),
23- (BatchVar , np .var , (0 , 2 )),
24- (BatchStd , np .std , (0 , 1 , 2 )),
25- ])
18+ @pytest .mark .parametrize (
19+ "stat_class, ref_func, axis" ,
20+ [
21+ (BatchVar , np .var , (0 , 1 )),
22+ (BatchVar , np .var , (0 , 1 , 2 )),
23+ (BatchStd , np .std , (0 , 1 )),
24+ (BatchVar , np .var , (1 , 0 )),
25+ (BatchVar , np .var , (0 , 2 )),
26+ (BatchStd , np .std , (0 , 1 , 2 )),
27+ ],
28+ )
2629def test_batch_stats (data_3d , n_batches , stat_class , ref_func , axis ):
2730 """Test batch statistics calculation for various operations and axes."""
2831 true_stat = ref_func (data_3d , axis = axis )
@@ -31,5 +34,5 @@ def test_batch_stats(data_3d, n_batches, stat_class, ref_func, axis):
3134 for batch_data in np .array_split (data_3d , n_batches ):
3235 batch_stat_processor .update_batch (batch = batch_data )
3336 batch_stat = batch_stat_processor ()
34-
35- assert np .allclose (true_stat , batch_stat )
37+
38+ assert np .allclose (true_stat , batch_stat )
0 commit comments